Washington • People seeking asylum at the U.S. border with Mexico will no longer be released in the United States and will instead be forced to wait in Mexico under a policy announced Thursday that marks one of the most significant moves by President Donald Trump to reshape the immigration system.

The measure is an aggressive response to a large and growing number of Central American asylum seekers, many of them families, who are typically released in the United States while their cases slowly wind through clogged immigration courts. It does not apply to children traveling alone or to Mexican asylum seekers.

The U.S. and Mexican governments called it a unilateral move by the Trump administration, but the announcement came two days after the U.S. pledged $10.6 billion in aid for Central America and southern Mexico to make people feel less compelled to leave. Critics, including some legal experts, said migrants would be unsafe in some Mexican border towns and said the U.S. was illegally abandoning its humanitarian role, hinting at a legal challenge against a backdrop of previous courtroom setbacks for Trump on immigration.

The government of Mexican President Andres Manuel Lopez Obrador, who took office Dec. 1, said foreigners will have temporary permission to remain in Mexico on humanitarian grounds after getting a notice to appear in U.S. immigration court and they will be allowed to seek work authorization.

Asylum seekers who pass an initial screening in the U.S. — about three of four do — typically wait years before their cases are resolved, allowing them to put down roots in the U.S. Many are fitted with electronic ankle monitors.

Administration officials say many are gaming the system and making false claims as a way to stay in the U.S. While most pass their initial screening, only about 9 percent are eventually granted asylum.

"They will not be able to disappear into the United States," Homeland Security Secretary Kirstjen Nielsen told the House Judiciary Committee. "They will have to wait for approval. If they are granted asylum by a U.S. judge, they will be welcomed into America. If they are not, they will be removed to their home countries."

Nielsen said in a statement that the move "will also allow us to focus more attention on those who are actually fleeing persecution."

While the number of people caught crossing the border illegally has fallen sharply since the early 2000s, the U.S. has been grappling in recent years with a surge of families and children traveling alone, especially from Guatemala, Honduras and El Salvador.

U.S. border authorities fielded 92,959 "credible fear" claims — the initial step toward asylum — in the fiscal year that ended Sept. 30, up 67 percent from 55,584 the previous year.

U.S. officials said the changes will be rolled out gradually across the border. Many details have not been worked out or have not been disclosed.

U.S. officials said the Mexican government will allow asylum seekers access to U.S. immigration lawyers, but it was unclear where attorneys and their clients would meet. They would be allowed into the U.S. for their court hearings.

Mexico's Foreign Relations Department said foreigners will be allowed to leave the country and return while waiting for the U.S. to decide their asylum cases.

"They will have rights to equal treatment without discrimination and respect for their human rights as well the opportunity to seek work authorization for pay, which will allow them to meet their basic needs," the department said in a statement.

Forcing thousands of asylum seekers to remain in Mexico, possibly for years, will put many of them in life-threatening danger, said Jennifer Harbury, a South Texas attorney and human rights advocate.

Some parts of northern Mexico, particularly across from Texas, are considered very dangerous due to violence and drug trafficking. The U.S. State Department has warned American citizens not to travel to the Mexican state of Tamaulipas, which borders the Texas cities of McAllen and Brownsville.

"Giving them food or work authorization does not protect them from the cartels or the war zone that they would be sent to," Harbury said. "If Mexico could protect them, they would be protecting their own citizens, and they can't."

Immigrant advocates questioned the legality of the move.

"This deal is a stark violation of international law, flies in the face of U.S. laws passed by Congress and is a callous response to the families and individuals running for their lives," said Margaret Huang, executive director of Amnesty International. "The end result could be the endangerment of thousands of families and individuals seeking protection."

American Civil Liberties Union attorney Lee Gelernt, who won major legal victories against the administration's policies on asylum and its practice of separating families, said the plan could not be done lawfully.

Last month, Trump invoked national security powers to deny asylum to anyone caught crossing illegally, but a judge halted that change as a lawsuit progresses. A separate judge also halted restrictions on who could claim asylum, allowing victims of domestic violence and gang violence to once again make the claim.

Thursday's decision marks the latest in an unusual relationship between Lopez Obrador, a leftist and nationalist, and Trump. Discussions between the two countries began well before Lopez Obrador took office.

Trump credited Lopez Obrador for helping push forward free trade negotiations, and Lopez Obrador praised the United States for the $10.6 billion development deal.

Experts in Mexico doubted whether Lopez Obrador would face any significant backlash.

"These are not humiliating concessions, they're quite reasonable," said Federico Estevez, a political science professor at the Autonomous Technological Institute of Mexico. "Lopez Obrador may absorb a cost, but it's relatively small price to get your neck out of the noose on the immigration issue."

Estevez noted that some anti-migrant sentiment had sprung up on the northern border, especially in Tijuana, where the caravans have been marooned.

"I don't think you can find on the Mexican side much of a coherent stance against these concessions," Estevez said. "I don't think you have a very strong constituency on this side" in favor of the Central American migrants.

___

Stevenson reported from Mexico City. Associated Press writers Nomaan Merchant in Houston and Amy Taxin in Santa Ana, California, contributed to this report.