The Trump administration announced Wednesday its proposal to indefinitely detain undocumented migrant families as their court cases proceed, saying detention would serve as a deterrent. The plan must be approved by a federal judge.

The administration is moving to formally terminate the so-called “Flores Settlement Agreement,” the longstanding court settlement that governs how migrant children and families are treated in government custody.

Under the settlement, children cannot be held in federal detention centers for long — specifically, a 2015 ruling stipulated that neither children nor families could be held in federal detention for longer than 20 days.

Under the proposal announced Wednesday, ICE would be able to hold families long past that 20-day mark. If the judge in charge of enforcing the settlement signs off on the proposal, families would face indefinite detention as their cases proceed through the immigration courts, rather than being released from detention with a court date.

Ending what some conservatives call “catch and release,” the administration asserts, will serve as a deterrent for future migrants.

“There’s no intent to hold families for a long period of time,” Acting Homeland Security Secretary Kevin McAleenan said in a news conference Wednesday, describing family detention centers as “campus-like settings.”

McAleenan said the full text of the proposal would be released Friday, though the administration previewed a draft proposal last September.

The Trump administration and its allies in Congress have long sought to replace the Flores agreement. In a call with reporters in May of last year, for example, White House adviser and immigration hawk Stephen Miller said the administration wanted to “terminate or modify the agreement.”

At the same time, the administration’s “zero tolerance” initiative instructed prosecutors to pursue criminal charges against all adults who crossed the border illegally, thus creating the family separation crisis.

That, too, represented an effort to get around Flores. Due to the settlement, the administration was unable to detain families long term. Instead, it sought to reclassify children who arrived in families as unaccompanied minors, and their parents as ICE detainees.

When the President signed an executive order ending the systematic separation policy, he included an instruction to the attorney general: File a request to modify Flores “in a manner that would permit the [DHS] Secretary, under present resource constraints, to detain alien families together” as courts considers their claims.

The same federal judge who will have to approve the administration’s new attempt to replace Flores, District Judge Dolly M. Gee, rejected the Justice Department’s request at the time, calling it “a cynical attempt.”

Gee, the judge overseeing the Flores settlement, has repeatedly issued rulings related to the detention of children who cross the border. In June, she ordered an independent monitor to ensure the government was improving conditions in border detention facilities, after lawyers raised concerns about health and sanitary conditions such as a lack of soap and toothbrushes.

The judge expressed her frustration with the government, writing that the settlement’s long history meant the Trump administration “need not use a divining tool” to know “what does or does not constitute non-compliance.”

In his press conference Wednesday, McAleenan acknowledged the legal climb ahead.

“We do expect a dialogue in the courts,” he said.