A federal judge on Friday blocked the Trump administration’s attempt to implement regulations that would allow immigration officials to indefinitely detain migrant children and their parents.

Judge Dolly Gee in Los Angeles ruled that the administration will not be allowed to enforce new rules that would end the Flores Agreement, a decades-old court settlement that says migrant children cannot be held more than 20 days.

ADVERTISEMENT

Gee, who was appointed by former President Obama, said the administration’s rule would violate the very agreement it is attempting to overturn.

“The Flores Settlement Agreement remains in effect and has not been terminated,” she wrote.

The Justice Department is expected to appeal.

The White House blasted the decision in a late-night statement Friday, saying it prevented the administration from keeping families together during immigration proceedings.

"That ruling perpetuates the loophole that this same judge created, which has been exploited by criminal cartels to smuggle children across the United States Southern Border – often resulting in their physical and sexual abuse," Press Secretary Stephanie Grisham Stephanie GrishamIvana Trump on Melania as first lady: 'She's very quiet, and she really doesn't go to too many places' The Hill's 12:30 Report: Trump uses White House as campaign backdrop Coronavirus tests not required for all Melania Trump speech attendees: report MORE said.

Under the rules announced last month by the Department of Homeland Security (DHS) and the Department of Health and Human Services, immigrant families could be held for the duration of their court proceedings, which officials argue could be resolved within three months.

The administration’s policy would establish new standards for conditions in detention centers while simultaneously removing the 20-day detention limit that has existed since the original 1997 court ruling.

In announcing the administration's policy last month, acting DHS Secretary Kevin McAleenan said a 2015 change that required the government to treat unaccompanied children and accompanied migrant children equally has forced the release of families into the U.S. after just 20 days, “incentivizing illegal entry, adding to the growing backlog in immigration proceedings, and often delaying immigration proceedings for many years."

Administration officials and congressional Republicans have cited the Flores Agreement as one of the primary reasons for the failed “zero tolerance” policy that resulted in thousands of children being separated from their families at the border last year.

In Friday's ruling, Gee said the administration was using “dubious” and “unconvincing” logic to show that circumstances have changed since the agreement went into effect.

“An increase in numbers of families detained at the southern border does not justify, much less require, dissolution of the parties’ bargained-for agreement to ‘treat all minors in custody with dignity, respect, and special concern for their particular vulnerability as minors,’ ” Gee wrote.

She noted that throughout several administrations, the Flores Agreement has been necessary to protect migrant children.

The Trump administration “willingly negotiated and bound themselves to these standards for all minors in its custody, and no final regulations or changed circumstances yet merit termination of the Flores Agreement,” Gee wrote.

Rep. Joaquin Castro Joaquin CastroDisinformation, QAnon efforts targeting Latino voters ramp up ahead of presidential election Pompeo accused of stumping for Trump ahead of election Florida Democrat asks FBI to investigate anti-Semitic, racist disinformation MORE (D-Texas), chairman of the Congressional Hispanic Caucus, applauded the decision.

“This victory gives us hope and is a reminder to us all — elected officials, immigration lawyers, organizers, and advocates — to keep fighting,” Castro said in a statement. “Flores is not a loophole — it’s a lifesaving standard that protects the basic rights and dignity of migrant children."