TAIPEI (Reuters) - In Taipei’s leafy Tienmu district, nearly half the flagpoles in front of the imposing pink building that houses most foreign embassies are bare, as Taiwan’s dwindling band of diplomatic friends jump ship to its giant neighbour.

A Solomon Islands flag (2nd right) waves at the top of a flagpole, which at the bottom reads "Sao Tome", in front of a building housing most of the embassies of Taiwan's official allies, in Taipei, Taiwan, December 23, 2016. REUTERS/J.R. Wu

Another flag was taken down this week when tiny West African state Sao Tome and Principe severed ties with the self-ruled island that China claims as a renegade province.

Reshuffled for symmetry, the flag of the Solomon Islands now flutters from the pole still bearing the Sao Tome plaque.

Taiwan had as many as 30 diplomatic allies in the mid-1990s, but now has formal relations with just 21, mostly smaller and poorer nations in Latin America and the Pacific.

And Beijing is keen to nab the rest, angered by U.S. President-elect Donald Trump’s call with Taiwan President Tsai Ing-wen earlier this month, the first public contact at that level since Washington switched recognition to China from Taiwan in 1979.

China is deeply suspicious of Tsai, who leads the ruling Democratic Progressive Party (DPP), which traditionally advocates independence for Taiwan, even though Tsai says she wants peace with China. Beijing has never renounced the use of force to bring the island under its control.

“From the issue of Sao Tome cutting off ties it can be seen that the DDP authorities ought to understand one thing – that they should speed up the proper handling of cross-Strait relations, or similar incidents will continue to happen,” said the overseas edition of the People’s Daily, an official organ of China’s ruling Communist Party.

Taiwan - official title Republic of China (ROC) - has competed with China for diplomatic recognition since the defeated Nationalists fled there in 1949 at the end of the Chinese civil war, but the tables turned decisively in Beijing’s favour in the 1970s when the United Nations and United States switched sides.

Taiwan has accused China of providing financial incentives to Sao Tome in exchange for recognition, charges Beijing denies.

While Taipei and Beijing have both played that game previously, Taiwan now cannot hope to match the spending power of the world’s second-largest economy.

“If China, for the sake of gaining Sao Tome, wants to put up large sums of money, please go ahead. It can play dollar diplomacy, but Taiwan will not play,” said Lo Chih-cheng, a senior DPP lawmaker.

“UNNECESSARY SPENDING”

Taiwan’s diplomatic efforts have at times descended into farce, with some countries like Liberia switching ties several times, sometimes in the space of a few years, depending on the money they could wrangle out of Taipei or Beijing.

In 1999, Papua New Guinea (PNG) changed its mind just a week after deciding to establish ties, and in the following decade there was a public outcry after media reported millions of dollars were wasted in a failed bid to lure it back.

The public remain unimpressed by the cost of what some see as a face-saving exercise, said Chuang Fu-yao, a Taipei resident walking near the embassy compound.

“Most people don’t even know how many diplomatic allies we have. Our own feeling is we are spending a lot of money to do unnecessary things,” he said.

Taiwan lost six allies during the last DPP-led government from 2000-2008, accounting for many of the 12 empty flagpoles at the embassy building.

Under Tsai’s predecessor Ma Ying-jeou, from the more China-friendly Nationalist party, one more was lost.

Sao Tome, population just under 200,000, needed around $210 million in grants and low-interest loans, according to Taiwanese daily the United Daily News.

Taiwan foreign minister David Lee told reporters only that an “astronomical figure” was discussed.

“The government of Sao Tome and Principe, however, with excessive financial difficulties, and demands beyond those the ROC could meet, has ignored 20 years of friendly diplomatic relations, playing both sides of the Taiwan Strait while holding out for the highest bidder,” Taiwan’s Foreign Ministry said.

Sao Tome’s prime minister this week denied the country asked Taiwan for money.

Taiwan’s Central American allies are also vulnerable.

Diplomats in Beijing have told Reuters they believe Panama, one of Taiwan’s oldest diplomatic friends, could be next to go.

Earlier this month, a large Chinese business delegation visited Panama after Tsai was there in June for the formal opening of the expanded Panama Canal.

Seeking to shore up its Central American ties, Tsai will visit Honduras, Nicaragua, Guatemala and El Salvador next month.

In Africa, now only Swaziland and Burkina Faso have ambassador-level relations with Taiwan.

Perhaps, said one foreign diplomat at the embassy building, allies are leaking away to the mainland in anticipation that Beijing will eventually win this battle of wills and bring Taiwan back under its control.

“Maybe they think: ‘I will wait for you there’,” he said.