(WASHINGTON) — The Trump administration on Wednesday rolled out a new plan that would allow the government to detain migrant families traveling with children indefinitely, effectively calling for an end to the federal government’s agreement with a court more than 20 years ago that it wouldn’t hold children for long periods of time because it’s so detrimental to their health.

The proposal is the latest move by President Donald Trump to try to curb an unprecedented tide of migration at the U.S.-Mexico border and raises questions about whether the administration has the capacity to care for families, which have been arriving in the tens of thousands each month. There was no doubt the move would be challenged in court and could be blocked by a judge before it would have a chance to take effect.

“The government should not be jailing kids, and certainly shouldn’t be seeking to put more kids in jail for longer,” Madhuri Grewal, policy counsel for the American Civil Liberties Union, said in a statement.

Acting Homeland Security Secretary Kevin McAleenan told reporters that the new rules were about returning “integrity” to U.S. immigration.

“No child should be a pawn in a scheme to manipulate our immigration system,” he said in a news conference on Wednesday. Details of the plan were first reported Tuesday by ABC News.

At issue is an agreement the U.S. government made with a federal court in 1997 after lawyers representing migrant children, including a girl named Jenny Lisette Flores, filed a lawsuit objecting to their treatment in custody. The resulting “Flores Settlement Agreement” limited the time children could be held in custody to 20 days and required safe and sanitary conditions.

President Trump and Republicans have long claimed that the 20-day restriction has encouraged migrants to bring their children, knowing that they can’t be held for long and will eventually be allowed to enter the U.S., where it can take months or years for their asylum cases to wind their way through court. President Barack Obama had at one point asked a judge to allow families to be detained together and was denied.

“The problem is, you have 10 times more people coming up with their families. It’s like Disneyland now,” Trump told Fox News last April.

Immigration advocates counter that forcing children to spend what could be months in detention would be traumatizing, and that the administration is poorly equipped to care for them. Since last year, seven children have died after having been in U.S. custody, six of them exhibiting flu-like symptoms that advocacy groups blame on overcrowded and unsanitary conditions.

U.S. Immigration and Customs Enforcement currently maintains three “family residential centers” where the children would be held with their parents — two in Texas and one in Pennsylvania. But Congress has refused additional money to expand those centers.

McAleenan said the centers would care for the children and include such amenities as a library and video games.

“A gilded cage is still a cage and I think keeping these families in these facilities is definitely contrary to what should actually happen which is families being released in alternative detention,” said Joann Bautista, a policy associate at the National Immigrant Justice Center.

The administration initially proposed doing away with the Flores settlement last fall. A draft rule published in September would have allowed for the long-term detention of families with “dignity, respect and special concern for their particular vulnerability as minors.” Those proposed rules languished, however, as the administration confronted a massive uptick in undocumented border crossings that’s only recently began to slow down. The updated final regulation, to be published Friday, is expected to make the rule final although a judge would have the opportunity to block it.

Under the new plan, there is no specific cap on how long children could be detained with their parents. The families could try to get parole or bonded release, an option currently available to some immigrant detainees.

Congressional Democrats signaled they would fight the idea. Rep. Bennie G. Thompson, a Mississippi Democrat and chair of the House Homeland Security Committee, said the plan was “illegal” and violated American values on the treatment of children.

“This regulation will allow the Administration to dramatically expand family detention and indefinitely lock up children,” he said in a statement. “The Administration’s rule will put even more stress on our immigration system and add to the chaos the Administration continues to create.”