Chinese Foreign Minister Wang Yi met former Australian Prime Minister Paul Keating on Thursday and highlighted Beijing's desire for U.S. ally Australia to have an independent foreign policy, Beijing said.

The last time a Chinese foreign minister visited Australia was in 2017. Wang's visit, during which he met counterpart Penny Wong and Prime Minister Anthony Albanese in Canberra on Wednesday to discuss trade and differences over regional security, signals a thaw in diplomatic ties.

China's request for Wang to also meet Keating stirred domestic political controversy, because of Keating's past attacks on Australia's intelligence agencies and his opposition to the AUKUS defence agreement, through which the U.S. and Britain will assist Australia to build nuclear powered submarines.

Keating, a member of the ruling Labor party, was prime minister from 1991 to 1996. He met Wang at China's consulate in Sydney on Thursday morning, and later said they had "a big picture discussion about the geostrategic balances and influences in the world".

China's foreign ministry said in a statement that Wang thanked Keating for his long-term interest in relations between China and Australia.

"Australia is an ally of the United States, a partner of China and a sovereign country. The Australian side is welcome to formulate policies independently and autonomously in its own fundamental interests," Wang said, according to a Chinese foreign ministry statement.

China's foreign ministry said Keating told Wang that China's economic development "does not pose a threat to other countries".

Wang outlined China's capacity for continued economic growth, Keating said in a statement emailed to Reuters.

"The foreign minister was very positive about putting bilateral difficulties behind us as he was encouraged by the government's efforts in restoring appropriate equilibrium between our two countries," Keating said.

Australia and China, its largest trading partner, are rebuilding ties after a period of strained relations which hit a low in 2020 after Canberra called for an independent investigation into the origin of COVID-19, and Beijing responded with trade blocks. (Reporting by Kirsty Needham in Sydney and Liz Lee in Beijing)