The United States planned to sign an agreement on Friday to help make one of Central America’s most violent countries, El Salvador, a haven for migrants seeking asylum, according to a senior Trump administration official.

The official said the acting homeland security secretary, Kevin McAleenan, would sign a “cooperative asylum agreement”.

Two other officials described the agreement as a first step in the governments’ working together on asylum.

Details of the broad agreement will be hammered out in the weeks and months ahead, they said. The officials weren’t authorized to speak publicly and spoke on condition of anonymity.

The agreement could lead to migrants from third countries obtaining refuge in El Salvador – even though many Salvadorans are fleeing their nation and seeking asylum in the US. A Salvadoran delegation has been in the US this week discussing the matter.

It’s the latest effort by Donald Trump to force asylum seekers in Central America to seek refuge outside the US. Immigration officials also are forcing more than 42,000 people to remain in Mexico as their legal cases play out and have changed policy to deny asylum to anyone who transited through a third country en route to the southern border of the US.

The agreement would be another step by the Trump administration aimed at stopping the flow of migrants crossing the US-Mexico border.

McAleenan also signed a so-called “safe third country” agreement with Guatemala, but officials in that country are still working out how it would be implemented.

The arrangement with El Salvador was not described as a “safe third country” agreement, under which nations agree that their respective countries are safe enough and have robust enough asylum systems, so that if migrants transit through one of the countries they must remain there instead of moving on to another country.

The US officially has only one such agreement in place, with Canada, but has been working toward others in Honduras and agreed to the one in Guatemala that has not yet been implemented.

The Trump administration this year threatened to withhold all federal assistance to three Central American countries unless they did more to end the migrant crisis.

The move was met by stiff resistance in Congress as experts had said that the cuts would likely only exacerbate the number of migrants seeking to make the hazardous journey to the US because of a further lack of resources.

In June, the state department announced that the Trump administration was reversing some of the cuts but would not approve future aid to those nations. The state department said then that about $370m from the 2018 budget will not be spent and instead will be moved to other projects.

The gang-plagued El Salvador is among the world’s deadliest countries, with one of the highest homicide rates on the globe.

According to a 2018 state department report, human rights issues included allegations of “unlawful killings of suspected gang members and others by security forces; forced disappearances by military personnel; torture by security forces; harsh and life-threatening prison conditions; arbitrary arrest and detention; lack of government respect for judicial independence”.

Many people who flee from El Salvador have said they and their families were threatened by gang members. Teenagers often are pressured to join gangs and have had their lives and their families threatened if they refuse. Some young women are forced to become the girlfriends of gang members, facing rape or murder if they refuse.

