WASHINGTON — The Trump administration will now require asylum-seekers who pass through El Salvador on their way to the U.S. to seek asylum in the violent Central American country first, the latest in a series of steps to stymie the efforts of migrants seeking asylum at the U.S. border.

Acting Secretary of Homeland Security Kevin McAleenan signed the agreement on Friday with El Salvador's Foreign Minister Alexandra Hill. Under the accord, the U.S. will work with the United Nations to improve the system for claiming asylum in El Salvador.

Hill emphasized that the U.S. would be helping El Salvador increase its security and fight against gang violence as part of the agreement.

"El Salvador has not been able to give our people enough security or opportunities so that they can stay and thrive," said Hill, adding that El Salvador needs help fighting gang violence as well as investment from the United States and other parts of the world.

McAleenan said the agreement would further U.S. efforts to provide "opportunities to seek protection for political, racial, religious or social group persecution," but immigration rights groups say the agreement will make things harder for asylum-seekers crossing through El Salvador, which has one of the highest homicide rates in the world, and those crossing through it. The deal would primarily affect migrants from countries south of El Salvador, such as Nicaragua and Venezuela.

"El Salvador isn't a safe place for its own citizens, so to deem it safe for refugees seeking asylum would be simply laughable if it wasn't so dangerous and deadly. This agreement not only belittles the dangers these vulnerable people face, but it threatens the safety of refugees fleeing from Cuba, Nicaragua, Venezuela and other countries," said Eleanor Acer of Human Rights First.

Previously, the Trump administration has said immigrants passing through Guatemala, which is north of El Salvador, must first attempt to claim asylum there in order to be eligible for protections in the U.S., but that deal has yet to be implemented. Mexico has refused to sign such a deal, although the Trump administration has said it may return migrants who pass through any country where they could claim asylum. The Supreme Court recently ruled the administration can go forward with this policy while the issue plays out in lower courts.

Record numbers of asylum-seekers from Guatemala, Honduras and El Salvador crossed into the U.S. this year, overwhelming courts, border agents and detention space. Those numbers have begun to wane slightly, which law enforcement officials attribute to seasonal affects and a policy that forces asylum-seekers to wait in Mexico until their day in U.S. immigration courts.