Panama has switched diplomatic recognition from Taiwan to China after a century of having only commercial relations with the Asian giant.
Panamanian President Juan Carlos Varela announced the change, which entails breaking off formal relations with Taiwan.
Varela said in a televised address that it is the "correct path for our country."
A joint statement on 12 June evening says Panama and China are recognising each other and establishing ambassador-level relations as of the same day.
It adds that Panama recognises only one legitimate China and that Taiwan "forms an inalienable part of Chinese territory."
China is the second-biggest client of the Panama Canal and the leading provider of merchandise to a free-commerce zone in the Caribbean city of Colon.