Migrants detained after crossing the U.S. border illegally could be held indefinitely — even for years — under a new rule disclosed on Wednesday by the Trump administration.

The no-limit detention rule would apply to all such migrants, including children.

“The new regulation, which requires approval from a federal judge before it could go into effect and was expected to be immediately challenged in court, would establish standards for conditions in detention centers and specifically abolish a 20-day limit on detaining families in immigration jails,” reports the New York Times.

That 20-day limit was established by the 1997 Flores Settlement Agreement, which set standards for the detention of migrant children and teenagers.

In a statement, acting Department of Homeland Security secretary Kevin McAleenan offered a benevolent take on the regulation change.

“Today, the government has issued a critical rule that will permit [DHS] to appropriately hold families together and improve the integrity of the immigration system. This rule allows the federal government to enforce immigration laws as passed by Congress,” McAleenan wrote.

Other observers view the new rule in a much harsher light.

This is yet another cruel attack on children, who the Trump administration has targeted again and again with its anti-immigrant policies,” Madhuri Grewal of the American Civil Liberties Union told CNN. “The government should not be jailing kids, and certainly shouldn’t be seeking to put more kids in jail for longer.”

Advocates for migrant families say detaining children “increases their risk of trauma or illness. Several children have died after being taken into federal custody over the past year, and one of them died after being released,” reports the Washington Post.

Withdrawing from the Flores Agreement was “a personal objective for Stephen Miller, the architect of Mr. Trump’s immigration policy. Delays in finishing the new regulation had prompted Mr. Miller to lash out at senior homeland security officials, who were ousted from the department,” the Times says.

The rule will be published in the federal register on Friday with the effective date of 60 days, but “the administration expects court challenges that could prolong or even stop the rule from going in place altogether,” reports NBC News, citing Trump officials.

Consideration of the legality of the rule will fall to U.S. District Judge Dolly Gee of California, who established the 20-day limit for holding migrant children in 2015 and last year denied the Trump administration’s call for extending family detentions.

In her 2018 ruling, Gee called the administration’s move “a cynical attempt … to shift responsibility to the judiciary for over 20 years of congressional inaction and ill-considered executive action.”