BEIJING (Reuters) - Panama’s decision to ditch long-standing ties with self-ruled Taiwan and switch recognition to China had nothing to do with “checkbook diplomacy”, its president has told Chinese state television.

China's Foreign Minister Wang Yi shakes hands with Panama's President Juan Carlos Varela during a welcome ceremony before a meeting at the presidential palace in Panama City, Panama September 16, 2017. REUTERS/Carlos Lemos

Panama established diplomatic relations with China in June in 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 Panama’s decision, and that it would not compete with China in what it described as a “diplomatic money game”.

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

Panamanian President Juan Carlos Varela said the decision was correct and was Panama’s alone.

“I didn’t ask anything from China,” Varela told Chinese state television’s English-language channel in an interview shown late Monday.

“I just think it was the right thing to do for my country, for the people of Panama and for the future of a strong relationship between China and Panama,” he said in response to a question about whether it was “checkbook diplomacy”.

Varela said he told U.S. President Donald Trump about the decision a few hours before the official announcement and Trump supported it, the report said.

Varela also said that visits to Shanghai and Beijing when he was vice president in 2010 inspired his decision.

“In 2010, I went to Shanghai for the World Special Olympic Games and I was very impressed with the city and then I went to Beijing and saw how China was opening its economy, I saw all these developments,” he said.

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.

China and Taiwan had engaged in a diplomatic truce between 2008 and early 2016 under the leadership of Taiwan’s then-president Ma Ying-jeou from the China-friendly Nationalist Party.

Since Tsai assumed office last year, China has poached one other former Taiwan ally, the tiny west African state of Sao Tome and Principe. Gambia also established ties with China last year, although it ditched Taiwan before Tsai came to office.

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.