On Friday, lawyers filed a motion to stop the government from implementing regulations that they say would endanger immigrant children. But the Trump administration could still enact the new rules as early as Wednesday, which lawyers claim would violate a decades-old agreement known as the Flores Settlement that protects children’s rights.

Legal experts involved in the case told HuffPost that the new regulations, proposed by the Department of Homeland Security and the Department of Health and Human Services, would allow children to be detained indefinitely in unlicensed family detention centers.

“It would be disastrous,” said Holly Cooper, co-director of the immigration law clinic at the University of California, Davis, and one of the lawyers representing the plaintiffs in the Flores case. “We’ll see the indefinite detention of children in prison-like conditions.”

In an email to HuffPost, an HHS representative said that “as a matter of policy, the U.S. Department of Health and Human Services does not comment on matters related to ongoing litigation.”

The Trump administration wants new rules to replace the Flores Settlement, which requires the government to hold children in facilities that meet certain health and services standards for the least amount of time possible.

The government said its new regulations, first released in September, would approximate the settlement by ensuring all migrant children are “treated with dignity, respect and special concern for their particular vulnerability as minors.”

But advocates say the regulations trample on children’s rights and completely contradict the 1997 agreement, which was named after a 15-year-old from El Salvador who was detained for two months despite having an aunt in the U.S.

“They are just so far-flung from what these children bargained for back in 1997,” said Cooper, adding that the Flores Settlement was meant “to minimize detention times” and hold children “in the least restrictive environments.”

Under the government’s proposed regulations, children could be detained for any amount of time in family detention facilities. The Flores settlement specifies that a child should be released as quickly as possible to a parent, legal guardian, relative or unrelated adult who has been nominated by the minor’s parents. But according to the new rules, children could only be released to a “parent or legal guardian not in de

tention” ― not to relatives or unrelated adults who could care for them ― making it harder for children detained with their parents to leave.

Lawyers say the government has also manipulated licensing standards to evade time limits on child detention. As a general guideline, children are not supposed to be held in unlicensed facilities for more than 20 days, and family residential facilities are not state-licensed. But Neha Desai, the director of immigration at the National Center for Youth Law, says that the government’s new regulations clearly specify that family detention centers won’t be held to Flores’ formal licensing standards, and instead outline a self-licensing process to side-step limitations on child detention.

“Their attempt to license these unlicensed facilities is their attempt to create a legal cover,” said Desai, who is also one of the lawyers representing the plaintiffs in the Flores case. “These children are going to be growing up in these [facilities.]”

Lawyers are worried about the long-term effects detention has on children. Peter Schey, one of the lead lawyers on the Flores case and the executive director of the Center for Human Rights & Constitutional Law Foundation, says the proposed regulations “completely ignore the damage that indefinite detention in isolated facilities with minimal access to the outside world ... has on the mental and physical well-being of children.”

Cooper adds that detained children often develop psychiatric issues or contemplate suicide. And she worries that the new regulations will make it possible for President Donald Trump to build more unlicensed tent cities for asylum-seeking families, which he threatened to do in a recent Fox News interview.

If the government chooses to implement its regulations before the judge rules on the motion, lawyers representing detained children as part of the Flores settlement will still have 45 days to further challenge that decision in court.

But Desai doesn’t think the Trump administration will be keen to make changes that protect children.

“There’s no secret that this government has honed in on immigrant children as a population it wishes to vilify,” she said. “It is fairly extraordinary to me that such an incredibly marginalized group ... is the focus on so much animus from this administration.”