A federal judge on Monday rejected the Trump administration's request to change a legal settlement in order to detain migrant children with their parents for longer periods of time as officials struggle to reunite families separated at the border.

U.S. District Court Judge Dolly Gee in California dismissed as “tortured” the White House's arguments on the decades-old Flores settlement from 1997, which declared that children in immigration detention cannot be held for more than 20 days.

ADVERTISEMENT

"Defendants seek to light a match to the Flores Agreement and ask this Court to upend the parties’ agreement by judicial fiat," Gee, an appointee of former President Obama, wrote in the ruling. "It is apparent that Defendants’ Application is a cynical attempt ... to shift responsibility to the Judiciary for over 20 years of Congressional inaction and ill-considered Executive action that have led to the current stalemate."

Justice Department spokesman Devin O'Malley said in a statement Monday night that the agency will continue to review the ruling.

"But the court does appear to acknowledge that parents who cross the border will not be released and must choose between remaining in family custody with their children pending immigration proceedings or requesting separation from their children so the child may be placed with a sponsor," O'Malley said in a statement.

The Department of Justice had asked the court to modify the settlement in June after Trump signed an executive order to end the practice of separating migrant children from their parents who cross the U.S. border illegally.

His order came after nationwide backlash following the Justice Department's "zero tolerance" immigration policy that led to thousands of migrant children being separated from their families while awaiting prosecution.

U.S. District Judge Dana Sabraw ordered the federal government to reunite all migrant children under age 5 with their parents by July 10.

The administration said Monday that it will not be able to comply with the court-ordered deadline and will only be able to reunite at least 54 of the 102 named children.

— Updated 10:55 p.m.