The White House on Friday signed an asylum agreement with El Salvador in hopes of curtailing the number of illegal aliens flocking to the United States' southern border. El Salvador agreed to accept immigrants from other countries who would otherwise seek refuge in the United States. In exchange, the Trump administration agreed to invest in the Central American country, NPR reported.

The hope is El Salvadorians would decide to stay in their home country and those from other nations would see El Salvador as a safe "third country" instead of continuing on to the United States. Those migrants would then claim asylum in El Salvador instead of the United States. A similar agreement was signed earlier this summer with Guatemala.

“Individuals crossing El Salvador should be able to seek protection there,” U.S. Homeland Security Secretary Kevin McAleenan said during the signing ceremony. "This agreement today is one significant step forward. El Salvador is a critical partner for the United States in promoting the security and prosperity of Central America."

"This will build on the good work we have accomplished already with El Salvador's neighbor Guatemala in building protection capacity to try and further our efforts to provide opportunities to seek protection for political, racial, religious or social group persecution as close as possible to the origin of individuals that need it," McAleenan said.

McAleenan said that since pro-U.S. President Nayib Bukele took office earlier this year, the number of El Salvadorians who are flocking to the United States has dropped 62 percent. He said El Salvador putting 300 immigration agents and 800 police officers along the country's border has "made good" on their promise to cooperate with the United States, Fox News reported.

"We are working every single day to try to solve this issue of people, who by various reasons, reasons of insecurity or reasons of death threats are forced to leave our country," El Salvador's Minister of Foreign Affairs Hill Tinoco said.

Not everyone is happy about the decision though. According to pro-immigrant rights group America's Voice, conditions in El Salvador aren't safe enough for asylum seekers. They cite the State Department's warning to Americans to "reconsider travel due to crime," the Washington Times reported.

“The Trump administration’s asylum policies and sham processes are endangering lives and exacerbating a human rights crisis Trump and his team helped spark,” Douglas Rivlin, spokesman for America’s Voice said.

"If this agreement goes into effect, the U.S. will be forcing the most vulnerable communities to seek safety in a country that is not equipped to protect its own citizens or provide economic opportunity," Oscar Chacon, executive director of Alianza Americas, a network of immigrant-led organizations, told NPR.