On Monday night, the Trump administration was handed the latest in a series of courtroom defeats over its treatment of families entering the US without papers.

Judge Dolly Gee of the Central District of California formally refused the administration’s request to modify the Flores court settlement, which governs the treatment of children in immigration custody. The Flores agreement was the court ruling that the administration had pointed to for its policy of family separation — because it couldn’t keep children detained longer than 20 days, per Flores, it had to split children from their parents while the parents were in detention.

Gee rejected the administration’s request to allow Immigration and Customs Enforcement (ICE) to keep migrant families in detention facilities for as long as it took to process their cases (a process which, for asylum seekers, can take months or longer).

It’s a defeat on the second front of a legal war for the Trump administration and its “zero tolerance” policy at the US-Mexico border. In the Flores case, the administration is fighting for indefinite family detention. In a separate federal case in San Diego, it’s being stopped from resuming family separation and hounded to quickly reunite the nearly 3,000 families separated while the policy was in full effect through mid-June.

But Monday night’s ruling also makes it clear that the administration has the power to start separating some migrant families again.

The judges in both court cases — as well as the ACLU, which is the lead plaintiff in the family reunification lawsuit — agree with a core principle of the government’s argument on immigration policy: that it can’t be forced to release anyone who comes into the US without papers just because they bring their child with them.

In some cases, Monday night’s ruling says, the government can force parents to make a choice: stay with their children in immigration detention indefinitely, or remain detained by ICE while their children are sent to the custody of Health and Human Services (just as they were under the family-separation policy) and ultimately placed with another adult in the US.

A Department of Justice lawyer said Tuesday that the government interprets the judges as giving parents two options: “remain detained together” for longer than 20 days, or “release the child” and separate the family.

The Trump administration isn’t using that power — at least, not now. It stopped separating families as a policy after President Trump’s June 20 executive order, and it’s not going to try to resume them after Monday night’s judicial ruling.

But the door to resuming family separations is officially open. If the administration refrains from going back there, it will be by its own choice.

Trump’s attempt to detain all migrant families indefinitely got smacked down

Under the Obama administration, Judge Dolly Gee, in a ruling affirmed by the Ninth Circuit Court of Appeals, ruled that the 1997 Flores agreement prevented the government from keeping children in immigration detention indefinitely even if they were being held with their parents. The Obama and Trump administrations have interpreted the ruling as a requirement to generally release children from immigration detention after 20 days.

The family separation policy was an attempt to fulfill this requirement by releasing the children (to Health and Human Services, or HHS) but keeping their parents. On June 20, Trump directed Attorney General Jeff Sessions to try to eliminate the requirement instead — by asking Judge Gee to reverse her own ruling of a few years ago.

The DOJ not only did that, but sent an update, after Judge Dana Sabraw ordered the government not to separate any more families, saying that Sabraw’s ruling automatically allowed them to detain families for longer.

Gee tore into that argument Monday night. She forcefully rejected the government’s claim that the current levels of families entering the US from Central America without papers (often to seek asylum) represent some kind of crisis or even a marked departure from 2014-2015. She made it clear that the administration is still subject to the 2015 ruling that requires children to be released from custody quickly (20 days), period. And she totally dismissed the administration’s request to hold children (with or without their parents) in unlicensed facilities — which will cramp the administration’s efforts to quickly scale up child and family detention with temporary sites on military bases.

But there’s an extremely important caveat.

Trump says the only options are detention or separation. The courts are agreeing — sort of.

DHS doesn’t have to detain someone who comes into the US without papers. It can release them on their own cognizance to show up for their court hearing; use an ankle bracelet to monitor them; or enroll them in a case management program.

The Trump administration doesn’t see these as options, though. It has told the courts, over and over again, that parents simply won’t be released from detention. In the administration’s telling, the only two options are for parents to be kept with their children (with no time limit), or for the family to be separated.

Each of the court rulings the administration is currently contending with theoretically forecloses one of those options: Sabraw’s ruling in the Ms. L case prevents family separation; Gee’s ruling in Flores prevents long-term detention.

But Monday night’s ruling clarifies that the two rulings don’t work together: that parents can be forced to choose between waiving her right to keeping her children with her, and waiving the child’s right to be released from detention.

Detained parents may choose to exercise their Ms. L right to reunification or to stand on their children’s Flores Agreement rights. Defendants cannot make this choice for them.

In other words: The government can force a choice between separation and indefinite detention.

Lee Gelernt, the deputy director of the ACLU’s Immigrant Rights Project — and the lead attorney in the Ms. L reunification case — agrees that the government can do this, and thinks that it’s an acceptable solution.

“In the first 20 days,” he explained to Vox, “parents will make a decision: Do I want the child released or to stay with me?” Generally, he says, the parents of younger children will probably want to be kept with their children — but the mother of a teenager, for example, might choose to send him to HHS and live with a relative or family friend, rather than staying in immigration detention with her.

But Gelernt and the judges stress that the Trump administration isn’t allowed to detain parents — with or without their kids — as a general rule. They’re supposed to use “prosecutorial discretion” to determine whether an individual migrant is a security risk, or is likely to skip out on a court date. Parents who pose a low risk are supposed to be released with their kids. Only parents who are deemed risky should be forced to choose whether their kids are detained with them or released alone.

The administration is still choosing to release families instead of separating them

The Trump administration has promised to keep fighting Judge Gee in court, in the hopes that the Supreme Court will allow it to detain families in immigration detention indefinitely. Gee’s Flores ruling “handicaps our ability to detain and promptly remove unaccompanied alien children and family units,” said Department of Homeland Security spokesperson Katie Waldman — instead encouraging “catch and release.”

But DHS says that its current “operational guidance” — the practices that went into effect after Trump’s executive order, in which families are no longer separated simply for entering without papers — is still in effect.

In other words, even though the administration could be forcing some parents to choose separation or detention, it is instead choosing not to force that choice — it is releasing parents if it can’t detain them. (The 31 or more children under five set to be reunited with their parents on Tuesday, for example, are expected to be released once the family’s back together.)

Some advocates are concerned that, as rumors swirl of parents being forced to sign forms they didn’t understand, some parents will unwittingly waive their Flores rights and allow their families to be kept indefinitely even if the government wouldn’t be separating them.

But it would be easier for the government to press parents to accept indefinite detention if it were using separation as the bad-cop alternative.

It could. But it isn’t. So far.