The Trump administration is preparing to finalize an agreement this week to begin sending asylum seekers from the U.S. border to Guatemala, implementing a deal the two countries reached in July, according to three people with knowledge of the plan.

The pact gives the Department of Homeland Security the ability to send asylum seekers to Guatemala if they do not seek protection there while transiting through the country en route to the U.S. border. It could mean that migrants from numerous countries will make the dangerous journey to the United States only to be sent back to Central America upon reaching U.S. territory.

Homeland Security officials plan to start sending Hondurans and Salvadorans to Guatemala soon after the implementation of the deal, according to the three people, who spoke on the condition of anonymity because of the diplomatic sensitivity of the issue.

Guatemala’s highest court initially ruled that the asylum accord could not go forward without the approval of Guatemala’s congress, but a subsequent decision left open the possibility that outgoing President Jimmy Morales could implement the deal without lawmakers’ approval.

Morales is due to leave office in January. Guatemala’s president-elect, Alejandro Giammattei, has criticized the deal, but Trump officials reiterated this month that the United States will slash government assistance if Guatemala backs out.

Kevin McAleenan, who plans to step down as acting DHS secretary as soon as Thursday, has secured similar agreements with Honduras and El Salvador, but those deals have not been implemented. Mc­Aleenan has said the agreements will be implemented gradually to avoid overwhelming Central American nations that until now have typically received few asylum applications from those fleeing persecution.

McAleenan has argued that vulnerable migrants should not have to travel all the way to the United States to find safety, and that the U.S. immigration system has been overwhelmed in recent years amid a flood of applications from Central American economic migrants making humanitarian claims to avoid deportation.

Critics of the accords say it is unrealistic to expect weak Central American governments to safely resettle vulnerable groups when they already struggle with widespread poverty and some of the world’s highest homicide rates.

The Trump administration has pledged at least $47 million to build up Guatemala’s asylum system with help from the U.N. High Commissioner for Refugees.

President Trump suspended aid to Guatemala, Honduras and El Salvador this spring amid a record surge of families from those nations traveling to the border in large groups and caravans. He announced that he would restore some of the assistance this month after the three countries agreed to accept U.S. asylum seekers.

“Guatemala, Honduras & El Salvador have all signed historic Asylum Cooperation Agreements and are working to end the scourge of human smuggling,” Trump tweeted.

U.S. authorities took nearly 1 million migrants into custody along the Mexico border during the 2019 fiscal year that ended Sept. 30, the highest total since 2007. Unauthorized border crossings peaked at more than 144,000 in May but have since declined by two-thirds. Migration from Guatemala, Honduras and El Salvador has fallen by more than 80 percent, according to the latest statistics.

Two administration officials with knowledge of the Guatemala accord said Homeland Security probably would start sending some asylum seekers from Honduras and El Salvador back to Guatemala, beginning with single adults rather than families.

Trump has referred to the asylum agreements and other new deterrent policies as a “beautiful puzzle” with the overarching goal of discouraging migrants from trying to reach the United States in the first place.

DHS officials also have been requiring asylum seekers to remain outside U.S. territory while they await immigration court hearings under a program — known as the “Migrant Protection Protocols” — that has sent more than 50,000 people back to Mexican border cities while their U.S. claims are pending.

Another emergency measure gives U.S. authorities the ability to disqualify and deport asylum seekers who decline to seek protection in other countries while en route to the United States.

Both policies are being challenged in federal court, and a ruling on the protocols program in the U.S. Court of Appeals for the 9th Circuit is expected soon.