(CNN) A federal judge in California on Monday flatly rejected the Justice Department's attempt to modify a decades-old settlement agreement that limits the length of time and conditions under which US officials may detain immigrant children.

In a strongly worded order, US District Court Judge Dolly Gee called the Justice Department's request "wholly without merit" and found "absolutely nothing prevents (the Trump administration) from reconsidering their current blanket policy of family detention and reinstating prosecutorial discretion."

Last month, the Justice Department sought to modify an agreement in Flores v. Reno, saying they were bound by a prohibition that restricted the detention of immigrant children to 20 days. Department lawyers wanted Gee, who signed the operative decision in the case, to modify that rule to give the Trump administration maximum flexibility in handling family units, because officials want to detain the parents not only until the end of any criminal proceedings but also through the end of any asylum proceedings, which could drag on for months. The administration also wanted relief from provisions in the settlement agreement dictating the type of licensed facilities where minors may be held.

But the judge was unmoved, calling the Trump administration's position a false choice and tantamount to seeking to "light a match to the Flores Agreement and ask this Court to upend the parties' agreement by judicial fiat."

The decision comes on the eve of another federal judge's deadline to reunite all parents separated from their children under the age of five.

Read More