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."

Read More