The Panama's recognition of China infuriated Taiwan, which is still recognised by around 20 mostly small and economically weak countries, including Haiti, Tuvalu and Burkina Faso.
China delivered another diplomatic punch to Taiwan on Tuesday by establishing relations with Panama at the expense of Taipei, further isolating the island's Beijing-skeptic government.
China, which considers self-ruled Taiwan a renegade province waiting to be reunited with the mainland, has been infuriated by President Tsai Ing-wen's refusal to acknowledge the island as part of "one China", unlike her predecessor Ma Ying-jeou.
Panama is the third country to switch allegiances to China since Tsai's Democratic Progressive Party was swept to power last year, China's nationalistic Global Times reported, warning more would follow in a "domino effect".
"This is the cost the Tsai administration needs to pay," the newspaper said in an editorial.
TRT World's Mobin Nasir reports.
Chinese Foreign Minister Wang Yi and his Panamanian counterpart Isabel Saint Malo de Alvarado toasted with champagne in Beijing after signing a communique formalising the establishment of diplomatic relations while angering Taiwan.
"This is a historic moment, China-Panama relations have opened a new chapter," Wang said, adding that Panama's decision was in "complete accordance" with its people's interests and "in keeping with the times".
Saint Malo said Panama and China had made an "important step" and started a "new page in our strategic relations."
After decades of siding with Taiwan, Panama now "recognizes that there is only one China in the world" and that Taiwan is part of Chinese territory, said the joint communique.
'Teach a lesson'
The Panama move infuriated Taiwan, which is still recognised by around 20 mostly small and economically weak countries, including Haiti, Tuvalu and Burkina Faso.
"Beijing's action has impacted the stable cross-strait status quo. This is unacceptable for the Taiwanese people and we will not sit back and watch our country's interests being repeatedly threatened and challenged," Tsai told reporters in Taipei.
Diplomatic tussles between Taiwan and Beijing eased under the island's previous Beijing-friendly government, but relations have deteriorated since Tsai took office.