A new regulation from the Trump administration will replace the 1997 Flores Agreement and allow for the indefinite detention of migrant families.

The White House announced Wednesday that it would be rolling out a new rule which will allow immigration authorities to detain children indefinitely, overriding the Flores Agreement, a court-ordered rule which allows for 20-day maximum detention for minors, accompanied or unaccompanied.

According to acting Secretary of Homeland Security, “this will… substantially increase our ability to end the catch and release challenges that have fueled this crisis,” adding that the new rule “restores integrity to our immigration system.”

The rule change is intended to serve as a deterrent to other would-be migrants who may cross the border, inflicting as much damage on migrants as legally possible to discourage further migration northward from South America.

The goal of the rule change is to project that the southern border is completely closed. In remarks he made Wednesday, Trump said, “One of the things that will happen, when they realize the borders are closing — the wall is being built, we are building tremendous numbers of miles of wall right now in different locations — it all comes together like a beautiful puzzle.”

This is the latest in a series of attempts by the administration to sidestep federal regulations mandating humane treatment of migrants, much of which were derived from the Flores settlement. Last year, Attorney General Jeff Sessions initiated a “zero tolerance” policy, separating all families which crossed the border, detaining the minors, and criminally charging adult guardians or deporting them. The policy was rescinded after public demand.

The issue of humane treatment was brought to the fore again in June during a hearing in which the senior Department of Justice attorney made the case that the federal government was not responsible for providing child detainees with soap or toothbrushes.

The law is set to go into effect in October, but still requires approval from a federal judge. However, some legal experts contend that the new rule is fraught with legal issues which will serve as the impetus for future legal battles, further hampering its implementation.

Under the terms of the Flores settlement, the federal government can cancel Flores only if the implemented rule is in the ‘spirit’ of Flores – mandating decent treatment of detained migrants – which is certainly not the case for a rule specifically intended to deter migration. Further, the courts have rejected deterrence as an adequate reason for justification for detention.

The new rule is expected to cost up to $1.3 billion, to be put to building new facilities or enlarging those already bursting at the seams with Trump administration detainees, children among them.

WATCH BETO TAKEDOWN TRUMP: