BEIJING — China said it will cooperate with Taiwan after the Beijing-friendly leader Ma Ying-jeou claimed victory in the island's presidential polls.

Ma, of the Kuomintang (KMT) party, won a second term as Taiwan's president after four years of policies that have seen the most dramatic thaw in the island's ties with China since the two sides split more than six decades ago.

"We are willing to join hands with Taiwan's all walks of life on the basis of continuing to oppose 'Taiwan independence'," the Taiwan Affairs Office of the State Council, or cabinet, said in a statement released late Saturday.

An unnamed spokesman said in the statement carried by the official Xinhua news agency that China and Taiwan "should make common efforts for the great rejuvenation of the Chinese nation."

China considers Taiwan part of its sovereign territory and opposes any moves towards independence for the island.

Ma defeated Tsai Ing-wen, whose victory might have ushered in a period of uncertainty for ties with China, as her Democratic Progressive Party has favoured distancing Taiwan from the mainland.

A Chinese academic said a win for Ma was the desired result for Beijing, which could now pave the way for greater cooperation on economic and trade issues and even political talks.

"It is a very good result for us," said Zhu Songling, head of the cross-strait relations research institute at Beijing Union University.

"We are optimistic about political exchanges between the two sides, but it still requires patience from us to promote them carefully," he told AFP.

Chinese state media said Sunday that Ma's victory could offer a "new opportunity" to improve relations across the Taiwan Strait.

A Xinhua commentary said the result of the poll showed the Taiwanese people had backed peaceful development of ties with the mainland.

"The winning of Ma Ying-jeou and Kuomintang in Saturday's elections may open new chances for the peaceful development of cross-Strait relations," Xinhua said. It urged all Taiwanese to support improved ties.

"Moreover, the victory of Ma and the KMT may represent a new opportunity for the development of the cross-Strait relations," the commentary added.

China and Taiwan have been governed separately since the end of a civil war in 1949, but Beijing still claims sovereignty over the island, and has vowed to get it back, even if it must go to war to make it happen.

In the commentary, Xinhua warned that the two sides "should be wary that the situation in the island is still complicated and the 'Taiwan independence' stance will continue to haunt the cross-Strait relations development."