The move prompted an angry response from Taiwan and will likely further strain ties between Taipei and Beijing, which considers the self-ruled island a renegade province awaiting reunification with the mainland.
Taiwan is recognised by around 20 countries worldwide and its status is one of the most politically sensitive issues for Chinese leaders who pressure trade partners to accept its "one China" principle.
Panamanian President Juan Carlos Varela said in a nationally televised message "to the country and the world" that "Panama and China establish diplomatic relations today".
After decades of siding with Taiwan in the disagreement over its status, Panama now "recognises that there is only one China in the world" and that Taiwan is part of Chinese territory.
Also Read
Chinese Foreign Minister Wang Yi and his Panamanian counterpart Isabel Saint Malo de Alvarado signed the communique in Beijing.
Saint Malo said Panama and China had made an "important step" and started a "new page in our strategic relations"
The announcement comes after Beijing began construction last week of a container port, with natural gas facilities, in Panama's northern province of Colon.
Panama had long stressed it had diplomatic ties with Taipei and commercial ones with Beijing.
Chinese ships, after those from the United States, are the number two users of the Panama Canal, the Central American country's main source of budget revenue.
"That change is representing a longer term trend of atomic decay where the circle of countries that recognise Taiwan one by one seem to be shifting to the mainland," Thayer said.
"It's about who can give the most... Taiwan has resources but it can't match China."
In December China signed an agreement to restore diplomatic relations with Sao Tome and Principe after the African nation ditched the island.
"We strongly condemn Beijing for manipulating the so- called 'one China' policy to continue to suppress Taiwan's international space through various means," the presidential office said.
"This kind of action is not only an open threat to Taiwanese people's survival and welfare but also an open provocation to peace and stability in the Taiwan strait and the region."
Diplomatic tussles between Taiwan and Beijing eased under the island's previous Beijing-friendly government.
But relations have deteriorated since President Tsai Ing-wen's China-sceptic Democratic Progressive Party was swept to power in a landslide election victory last year.
Disclaimer: No Business Standard Journalist was involved in creation of this content