Beijing CNN  — 

Taiwan has lost another diplomatic ally to China, its third in a matter of months, after El Salvador announced it would sever ties with the island and switch its allegiance to Beijing.

The governments in Taipei, Beijing and San Salvador all confirmed the development Tuesday, just days after Taiwan President Tsai Ing-wen visited Central and South America to cement ties with the island’s remaining allies.

The loss of the Central American country reduces the number of Taipei’s formal diplomatic allies to just 17. Both Burkina Faso and the Dominican Republic cut ties with Taiwan in May.

Chinese Foreign Minister Wang Yi met with his Salvadoran counterpart in Beijing on Tuesday morning and signed a joint communique to establish formal diplomatic relations.

El Salvador's Foreign Minister Carlos Castaneda (L) shakes hands with China's Foreign Minister Wang Yi in Beijing on August 21.

At an emergency press conference in Taipei earlier the same day, Taiwan Foreign Minister Joseph Wu expressed “regret” over the situation and took a swipe at China for engaging in “dollar diplomacy.”

Wu claimed the change came after Taiwan declined repeated requests from El Salvador to fund a large infrastructure project and the struggling ruling party’s election campaign.

In a televised speech Monday, Salvadoran President Salvador Sanchez Ceren called the decision “a step in the right direction, corresponding to the principles of international law, international relations and the unavoidable tendencies of our time.”

Diplomatic rivalry

The Chinese government views Taiwan as the most sensitive issue in its relations with other nations.

China’s Communist leadership refuses to maintain diplomatic ties with any country that recognizes the self-governed and democratic Taiwan, an island of 23 million people off China’s southeastern coast that Beijing considers an integral part of its territory.

The two sides split in 1949 following the Communist victory on the Chinese mainland after a bloody civil war. Since then, Beijing and Taipei have a history of rivalry in their efforts to gain economic opportunities and diplomatic support from governments around the world.

Following Tsai’s rise to power in 2016, tensions have risen between the two governments. Beijing has hardened its stance due to concerns over strong pro-independence sentiment within Taiwan’s ruling party.

The Chinese military has increased drills around the island while Beijing has repeatedly warned Washington over growing closeness with Taipei under US President Donald Trump.

The Beijing government has also worked to squeeze Taipei out of gatherings of international groups, such as the World Health Organization, and ramped up pressure on global companies to drop references to Taiwan as an independent entity – targeting the world’s biggest airlines, hotels and retailers alike.

Dwindling allies

Despite Taiwan’s dwindling number of formal allies globally – with the remaining 17 mostly small and poor countries in the Pacific and the Caribbean – the government in Taipei is not preparing for the prospect of not having any diplomatic partners.

“Some countries (that switched diplomatic allegiance to Beijing) are coming back to us and saying they didn’t get what China promised, they didn’t get what China promised financially and they’re not getting what China promised politically,” Taiwan Foreign Minister Wu told CNN in an interview last month.

The most symbolic country that still recognizes Taipei over Beijing is the Vatican, the tiny nation home to the leadership of the Catholic Church.

Since the beginning of this year, rumors have leaked out suggesting the Holy See might be close to a decision of establishing diplomatic relations with Beijing in favor of Taipei, but Wu said Taiwan still hoped the Vatican could remain its ally for the long term.

“We stay in very close contact with Vatican officials, telling them what they want is to allow freedom of religion to prevail in mainland China, and Taiwan has been serving as a beacon in that aspect,” he said.

“Therefore maintaining good relations with Taiwan is the key to have Taiwan as an example to the Chinese people, especially Chinese Catholics, that they can have freedom of religion one day.”

CNN’s Natalie Gallon contributed to this report.