SAN SALVADOR (Reuters) - El Salvador said on Tuesday it hoped its economy would get a lift from China after it broke diplomatic ties with Taiwan in favor of Beijing, reducing the dwindling group of allies the Asian island has in Latin America.

A man waits to visit the Taiwan embassy a day after the Salvadoran government announced that it has broken off diplomatic relations with Taiwan, in San Salvador, El Salvador August 21, 2018. REUTERS/Jose Cabezas

El Salvador was the third Latin American country in the past two years to switch alliances, and presidential spokesman Roberto Lorenzana said attracting investment and developing the economy were key goals behind the decision.

“Fundamentally, it’s an interest in betting on the growth of our country with one of the world’s most booming economies,” he said in a television interview following Monday’s announcement. “El Salvador can’t turn its back on international reality.”

Monday’s move left Taiwan with only 17 allies, and came shortly after its president visited Belize and Paraguay, aiming to shore up diplomatic ties in the face of Chinese pressure to stamp out the island’s international recognition.

The decision prompted an outcry from Taiwan, which has accused China of luring smaller countries to its side with offers of generous aid.

Taiwan’s foreign minister has said that Taiwan will not engage in “money competition,” and did not give El Salvador funds for a port development after deeming the project “unsuitable.”

It was unclear if China had offered any specific aid or economic incentive to El Salvador.

Slideshow ( 3 images )

Taiwan’s formal relations are now mostly with small nations in Central America and the Pacific.

Panama ditched Taiwan for China in 2017, and Burkina Faso and the Dominican Republic followed early this year.

The United States keeps unofficial relations with Taiwan, a source of tension with China, whose “one China” policy stipulates that Taiwan is part of the bigger nation.

U.S. relations with El Salvador have been strained over President Donald Trump’s threats to cut aid from countries that “do nothing” to stop MS-13 gang members from crossing illegally into the United States.

The U.S. ambassador in El Salvador, Jean Manes, said at an event on Tuesday that Salvadorans should demand transparency about how their government resolved to swap diplomatic partners.

“I think you should know, exactly, all the details of the negotiation,” she said.

Manes also posted on Twitter that the United States was analyzing the “worrisome” decision, and that it would impact relations between the two countries. She did not elaborate.

Salvadoran President Salvador Sanchez Ceren said in a televised address on Monday that a “careful analysis” including consultations with diverse sectors led to the decision.

Representatives were already in Beijing to establish ties, he said, and would immediately begin talks on trade, investment, infrastructure, science, health, education, tourism and support for small and medium-size companies.

“They will generate tangible benefits for the whole population,” Sanchez Ceren said.