Chinese Communist Party leader Xi Jinping hosted the leader of El Salvador on Thursday, pledging aid to the Central American country as a reward for switching their allegiance from Taipei to Beijing.

On Thursday, Xi met with Salvadorian President Salvador Sánchez Ceren, who was welcomed with a ceremony at the Great Hall of the People where a military band serenaded the two leaders with their country’s national anthems.

Strong diplomatic ties between the two countries were forged in August this year after El Salvador agreed to switch its allegiance from supporting Taiwan’s independence to supporting the one-China principle, which does not recognize Taiwan as an independent state.

Such a decision was likely an attempt to court Chinese aid and investment, as El Salvador remains one of the continent’s poorest and most violent countries. At a press conference, Xi pledged funding for education, health, and drought relief.

“The decision to establish and develop diplomatic ties with each other was independently made by the two sovereign states,” Xi said. “It is consistent with the international laws and purposes of the UN Charter and reflects such principles as mutual respect, equal treatment, mutual benefits, and common development.”

“Within slightly more than two months after China and El Salvador forged diplomatic ties, bilateral exchanges have progressed rapidly in various fields with strong vitality and robust momentum,” he continued.

Xi warned that El Salvador must now stick to the one-China principle to maintain their new relationship.

“El Salvador has to stick to the one-China principle, which is the foundation of China-El Salvador relations, to build a more solid base for bilateral relations,” Xi said. “China is willing to join hands with El Salvador to promote friendly cooperation in a speedy yet steady manner, so as to benefit the two peoples.”

Sanchez appeared to heed Xi’s warning, claiming that they had built a relationship based on “respect and trust.”

“The two countries have identical positions on many issues, and the development of bilateral relations is based on mutual respect and trust,” Sanchez said. “My visit has fully demonstrated El Salvador’s confidence in advancing ties with China.”

Next week, Xi will host President of the Dominican Republic Danilo Medina, who in May also announced that his government would the one-China principle to the dismay of Taiwan.

The decision came days after China offered the Dominican Republic a $3 billion investment and loan package, as it continues to use its economic and financial power to expand its influence across Latin America’s most impoverished nations such as Venezuela and Cuba.

Follow Ben Kew on Facebook, Twitter at @ben_kew, or email him at bkew@breitbart.com.