Washington (CNN) The Trump administration said Thursday it will seek to keep some undocumented immigrant children in detention for far longer than currently allowed, a move that would have sweeping implications for the families and for the immigration detention system.

The move comes on the heels of the administration's decision this spring to separate families at the border as part of its "zero tolerance" prosecution policy, which resulted in more than 2,500 children being separated from their parents for weeks to months at a time.

The more than 200-page proposed regulation would circumvent a court settlement that has, for 20 years, set standards for the care of children in immigration detention, freeing the administration to have much broader authorities over how undocumented immigrant children are treated in its care.

But immigration advocates argue the changes amount to flouting the best interests of children, which they say was the original purpose of the settlement.

The administration has long sought to overturn the court agreement, arguing the ways it binds the government's hands contribute to attracting undocumented immigrants to the country. By holding families as long as their immigration case moves through the system and deporting them more quickly, they argue, families will be less inclined to try to come to the US illegally.

The proposed federal regulations would nullify the court case known as the Flores Settlement Agreement, which governs how undocumented children can be treated in custody. The regulations are scheduled to be published in the Federal Register on Friday.

The administration has targeted the Flores settlement as one of the main sources of its frustration with the immigration system, specifically the requirement to release children who arrive as part of families from detention within 20 days. After trying unsuccessfully to bypass the requirement in court, Thursday's move would take the issue out of the court's hands.

In a statement, Homeland Security Secretary Kirstjen Nielsen labeled the settlement as a "pull factor" that drives immigrants to the US illegally.

"Today, legal loopholes significantly hinder the Department's ability to appropriately detain and promptly remove family units that have no legal basis to remain in the country," Nielsen said. "This rule addresses one of the primary pull factors for illegal immigration and allows the federal government to enforce immigration laws as passed by Congress."

But critics of the proposal say the changes would end-run requirements put in place to protect children by giving the government the authority to set its own standards to meet its needs.

"There's a reason we have Flores in the first place, and that is to protect children. Period," said Philip Wolgin, director of Immigration Policy at the Center for American Progress, a progressive think tank. "Given any number of recent reports on the abuses of children in immigration custody, we need these common-sense protections more than ever. ... It's hard to see how the rules wouldn't be challenged in court as not living up to the substance or spirit of the agreement."

"The last thing we need to do is to expose children to even longer detention under weaker conditions as the Trump administration is proposing," echoed Ur Jaddou, a former DHS counsel now at the immigration advocacy group America's Voice. "Medical and psychological experts all agree that detention, including family detention, is no place for children, let alone under inhumane conditions, and especially when there are viable and workable alternatives available. This proposed regulation is unacceptable and should be challenged."

What changes

One of the biggest proposed changes would create a federal license system to allow for detention centers that could hold families. The administration argues that it is the state-based licensing system that is causing issues that would restrict family detention.

In allowing the administration to license its own facilities, the government argues that it would allow them to keep families in detention for the duration of their immigration court case. Those cases can take years to finish, though the administration notes they move faster when the immigrants are still in detention. Being able to keep the families detained would expedite the overall process, they argue. According to a DHS official, the current average length of a case for an immigrant in detention is 39 days.

"The proposed rule may result in extending detention of some minors, and their accompanying parent or legal guardian, in (family detention centers) beyond 20 days," the rule acknowledges. "ICE is unable to estimate how long detention would be extended for some categories of minors and their accompanying adults in FRCs due to this proposed rule."

The rule says an "outside entity" would ensure standards are met by facilities, but does not specify what that entity would be.

The stated objective of the rule is to codify the terms of the settlement agreement, which first went into place in 1997 and was updated late in the Obama administration. The lengthy regulation would lay out, in detail, how the government is required to meet the general objective of the settlement, "ensuring that all juveniles in the government's custody are treated with dignity, respect, and special concern for their particular vulnerability as minors."

But a number of small changes, like even simply the definitions of terms, could have sweeping implications for the way children's cases proceed currently. Wolgin noted that one part of the regulation appears to do away with a requirement for minors in deportation proceedings to have a bond hearing. The regulation also proposes new interpretations of how to approach parole determinations for immigrant children as well as how to define whether a child is unaccompanied, and thus what treatment they're entitled to under the law.

Likely to end up back in court

The justifications for the rule are similar to the case the administration has made in court before Judge Dolly Gee, who oversees the settlement. Gee has rejected those arguments in her courtroom.

Also on Thursday, the administration notified the court it plans to appeal Gee's ruling, a procedural step to pave the way for a potential higher court battle.

The original settlement always was designed to be temporary, pending the issuance of formal regulations. But administrations for two decades have instead simply followed the settlement and not issued such regulations.

But it's not clear the plan will work.

The settlement requires that the regulations "not be inconsistent with the terms" of the settlement, meaning that the plaintiffs in the original case would be able to bring a legal challenge if they disagree. That would likely end up in front of Judge Gee once again.

The publication of the proposal in the Federal Register on Friday will kick off a 60-day window for the public to comment, after which the administration can move to certify the regulations as final and operative.