Panama, one of the few countries to recognize Taiwan’s sovereignty, has cut ties with the island and forged relations with China, adding there there was “only one China” of which Taiwan was a part.

China’s Foreign Ministry, in a statement, said the country highly appreciate(s) and warmly welcome(s)” the move. The reaction from Taipei was angry. The Foreign Ministry said Panama “caved in to Beijing … for economic gain,” calling the move “highly disrespectful.”

Panama is the latest country to switch from its recognition of Taiwan as the official representative of China. The move follows a similar one last December by Sao Tome and Principe, the African island nation, which aligned itself with Beijing.

At issue is the status of China: Following the civil war, which ended in 1950, the nationalist Kuomintang-led (KMT) government in Taipei declared itself as the legitimate Chinese government. Indeed, much of the world, including the U.S., until 1979, recognized Taiwan as the official Chinese government. (The United Nations did so in 1971.) But in the decades since then, the nations of the world cut diplomatic relations with Taiwan—many still maintain trade links—and recognized the Communist Party-run government in Beijing as the legitimate representative of China. Until Tuesday’s announcement by Panama, 21 nations recognized Taiwan as China—many of them in Africa, Central America and the Caribbean, and the Pacific. All receive Taiwanese financial assistance.

Panama’s reversal may be linked to China’s massive investment in the country; Beijing has spent billions of dollars in the area around the Panama Canal.

Relations between China and Taiwan were fraught until the 1980s when Taiwanese businesses began pouring money into the mainland. In the years since then, as China has become a global economic power, it too has invested heavily across the Taiwan Strait. But China maintains that Taiwan, a democratic territory, is a renegade province and Beijing’s ultimate stated goal remains reunification. To this end, it has been angered by Tsai Ing-wen, Taiwan’s president, whom it views as more independence-minded. Indeed economic relations have suffered since Tsai’s election in May 2016.  

Panama’s decision Tuesday is a diplomatic coup for Beijing. China, which maintained a pragmatic foreign policy, had invested in Panama—and other places that recognize Taiwan—for years. But Panama’s reversal could add more pressure on Taiwan’s leadership over its increasing diplomatic isolation.