WASHINGTON (Reuters) - The Trump administration on Wednesday unveiled a rule that allows officials to detain migrant families indefinitely while judges consider whether to grant them asylum in the United States, abolishing a previous 20-day limit.

The rule, which is certain to draw a legal challenge, would replace a 1997 court settlement that limits the amount of time U.S. immigration authorities can detain migrant children. That agreement is generally interpreted as meaning families must be released within 20 days.

It was the Republican administration’s third major regulation restricting immigration in little more than a month, all during an unsettled period when senior immigration officials hold “acting” titles lacking U.S. Senate confirmation.

Trump has made cracking down on legal and illegal immigration a hallmark of his presidency after campaigning in 2016 on a promise, so far unfulfilled, that Mexico would pay for a border wall to keep migrants from entering the United States.

In what would be another attempt to dismantle established immigration law, Trump told reporters on Wednesday his administration was seriously looking at ending the right of citizenship for children born to non-citizens within the United States.

Immigration officials are looking for any kind of deterrent to reverse a record surge in families fleeing violence and poverty in Central America. Department of Homeland Security (DHS) officials say they have caught or rejected 475,000 family members in the past 10 months, more than three times any previous full year.

On July 15 the administration unveiled a rule to bar almost all immigrants from applying for asylum at the southern border, and on Aug. 12 it announced regulation denying visas and permanent residency for those who fail to make enough money.

Multiple lawsuits were filed within days of the two previous immigration rules.

Legal challenges have held up many of Trump’s initiatives, but immigration advocates say he has managed to build an “invisible wall” through executive actions bypassing Congress.

FILE PHOTO: A migrant, part of a caravan of thousands traveling from Central America en route to the United States, tries to look at U.S. border patrol officers through a hole in the border wall between the U.S and Mexico in Tijuana, Mexico November 25, 2018. REUTERS/Lucy Nicholson/File Photo

The administration framed the policy as a humane approach to a crisis.

“To protect these children from abuse, and stop this illegal flow, we must close these loopholes. This is an urgent humanitarian necessity,” Trump said in a statement.

Critics counter that Trump and Stephen Miller, his aide on immigration, are using a series of heartless policies to animate hard-core political supporters.

“The administration is seeking to codify child abuse, plain and simple,” House Speaker Nancy Pelosi, a Democrat, said in a statement, adding that she expected a federal judge would strike down the new rule.

Mexico’s Foreign Ministry expressed concern over the plan, saying in a statement that it would consider legal action.

Pediatricians have said children may suffer numerous negative physical and emotional symptoms from detention, even if only brief. The American Psychoanalytic Association on Wednesday branded the Trump policies as “psychological warfare.”

“It has become clear that the current administration uses cruel language, policies and abuse with the objective of deterring immigrants and asylum seekers,” said Lee Jaffe, president of APsaA.

Officials said the families would receive mental health treatment and other services in facilities that are held to high standards of care.

“They’re campus-like settings with educational, medical, dining and separate, private living facilities,” acting Homeland Security Secretary Kevin McAleenan told Fox News.

Robyn Barnard, an attorney for the nonprofit organization Human Rights First, challenged that characterization, saying that just because a facility is in a pastoral setting does not make it more humane.

“A gilded cage is still a cage,” Barnard said. “There are locks on the doors, there is no freedom of movement. It is for all intents and purposes a prison.”

FLORES SETTLEMENT

The latest action tears apart the Flores Settlement Agreement that had placed limits on how long children of families seeking asylum could be held in detention, enabling the U.S. government to release tens of thousands of families pending the resolution of their cases.

Trump officials had blamed Flores for the spike in immigration, especially of Central American families, saying it encouraged migrants to bring children with them so they could be released into the United States pending their court cases.

Families typically wait several months for their cases to work their way through immigration court, and the new rule would allow the DHS to keep those families at detention facilities.

The rule will be published in the Federal Register on Friday and will take effect 60 days later. The implementation deadline could slip, however, depending on the success of the court challenges.