Panama has cut long-standing diplomatic ties with Taiwan in favour of establishing relations with China, in a diplomatic coup for Beijing.
The Panamanian government said it recognised there was "only one China" and considered Taiwan part of it.
The governments in Beijing and Taipei insist that countries cannot recognise both of them. China regards Taiwan as a breakaway province.
Panama is the latest to switch sides, leaving Taiwan with about 20 allies.
China is the second biggest user - after the US - of the Panama Canal, which provides a shortcut through Central America for shipping between Asia and the Americas.
The number of countries recognising Taiwan has dwindled in recent years as China's importance has grown.
The last country before Panama to switch its allegiance was the African island nation of Sao Tome and Principe, in December last year.
Now only 20 countries have diplomatic relations with Taiwan, most of them small island states or in Central and South America - regions that in the past had limited economic ties with China.
'Bullying'
Taiwan's foreign ministry said in a statement that it felt "anger and regret" over what it called a "very unfriendly" diplomatic turn by Panama that "yielded to economic interests by the Beijing authorities".
It accused Panama of "bullying" Taiwan while "ignoring the many years of friendship" between the two countries, and added it would "not compete with the Beijing authorities for money diplomacy".
In recent years, China has increased its economic investment in Panama.
It was as recently as June last year that Taiwan's leader Tsai Ing-wen visited Panama, on her first overseas trip as president.
Relations between mainland China and Taiwan have worsened since Ms Tsai was elected last year. She has not formally endorsed the "one China" policy - an agreement in 1992 where both sides agreed there was only one China, but had different interpretations of what that meant.
Since then, Beijing has intensified its efforts to isolate Taiwan and persuade its supporters to switch sides.
Ms Tsai (left) met President Juan Carlos Varela (right) on her visit to Panama last year
'Political isolation' - by Cindy Sui, BBC News, Taipei
This is perhaps the biggest blow Taiwan has suffered since relations with Beijing began deteriorating last year.
Beijing's luring away of Panama is due to political rather than economic reasons. China could have continued investing in Panama without official ties.
Beijing has lost patience with Tsai Ing-wen, suspecting her of trying to wean Taiwan away from the mainland, economically and politically, with the aim of independence.
So China has raised the pressure, cutting off dialogue with Ms Tsai's administration and reducing the number of Chinese tourists visiting Taiwan. It's also keeping Taiwan out of international and regional groups.
Beijing's moves may strengthen anti-unification sentiment in Taiwan, but it sees not losing Taiwan as a crucial part of its national identity and seems willing to take this risk.
If the current stalemate continues, Taiwan risks further economic and political isolation.
Panamanian President Juan Carlos Varela said in a televised address that he was "convinced that this is the correct path for our country".
China's foreign ministry also released a statement (in Chinese) saying that "the Chinese government and its people highly appreciate and warmly welcome" the move by Panama.
The United Nations in 1971 switched diplomatic recognition to Beijing's People's Republic of China (PRC) and most countries have since followed that lead in order not to antagonise the economic giant.
The Panama Canal is vital for global trade
Given China's rapid growth as an economic and political superpower, it has been increasingly easy for Beijing to sway countries to its side.
In the case of Sao Tome and Principe, Taiwan's foreign ministry condemned the move, alleging the island nation had demanded a huge amount of financial support.
Panama did not give any reason for changing its diplomatic allegiance but there has been growing economic co-operation with China in recent years.
Chinese companies are developing ports in Panama, and Chinese state firms are said to have expressed interest in developing the land around the Panama Canal once the country opens a tender for it later this year.
The Panama Canal is a vital shipping route. As China expands its global trade ambitions with its One Belt One Road infrastructure-building initiative, access to the eastern coasts of both South America and the US is expected to be of growing importance for Beijing.
The switch by Panama leaves Taiwan with a handful of nations with whom it has diplomatic ties. They are:
In Latin America and the Caribbean: Belize, El Salvador, Haiti, Nicaragua, St Kitts and Nevis, St Vincent & the Grenadines, the Dominican Republic, Guatemala, Paraguay, Honduras and Saint Lucia
In Africa: Burkina Faso and Swaziland
In Europe: The Holy See
In the Pacific: Kiribati, Nauru, the Solomon Islands, Tuvalu, the Marshall Islands and Palau.
Source: http://www.bbc.com/news/world-latin-america-40256499