BEIJING (Reuters) - China will provide Panama with whatever help it needs after the Central American country ditched long-standing ties with self-ruled Taiwan in June, a senior Chinese diplomat said on Friday after talks between the two countries’ presidents.

Panama’s President Juan Carlos Varela (L) shakes hands with China's President Xi Jinping during a signing ceremony in Beijing, China November 17, 2017. REUTERS/Jason Lee

Panama’s decision to end ties with Taiwan was a major victory for Beijing, as it lures away the dwindling number of countries that have formal relations with the island China claims as its own.

Taiwan’s government said at the time it was sorry and angry over the decision, and it would not compete with China in what it described as a “diplomatic money game”.

Speaking to reporters after Chinese President Xi Jinping and Panamanian President Juan Carlos Varela signed 19 deals, including a feasibility study on a free trade agreement, Zhao Bentang, who heads the Chinese foreign ministry’s Latin America department, said their ties were not based on money.

“China and Panama establishing ties is a political decision made by both sides on the basis of political principles and looking at long term benefits. There were no economic or financial strings attached,” Zhao said.

“If our Panamanian friends need, in the spirit of friendship and South-South cooperation the Chinese side is willing to assist Panama’s economic and social development to the best of our capacity.”

China and Taiwan have tried to poach each other’s allies for years, often dangling generous aid packages in front of developing nations, though Taipei now struggles to compete with an increasingly powerful Beijing.

Beijing says Taiwan has no right to diplomatic recognition because it is part of China. Defeated Nationalist forces fled to Taiwan at the end of China’s civil war in 1949.

Varela told Chinese state television in September the decision to switch recognition to China had nothing to do with “chequebook diplomacy”.

Xi said Varela had shown strategic vision and political courage in recognizing China and that China wanted to draw up a “fine blueprint” for the development of relations.

“This sends an important message to the world, which is that a brand new page has been opened in China-Panama relations,” Xi told Varela in Beijing’s Great Hall of the People.

“The development of ties has been delayed for many years, but that history has passed,” Xi added.

Last month, a group including China Harbour Engineering Company Ltd (CHEC) began building a $165 million port in Panama for cruise ships, the first project announced between China and Panama since they established diplomatic ties.

China is deeply suspicious of Taiwan President Tsai Ing-wen, who it thinks wants to push for the island’s formal independence, although she says she wants to maintain peace with Beijing.