President Donald Trump signed an executive order Wednesday that halts the practice of separating families who were seeking asylum — a policy he put into place just weeks earlier.

But Trump’s executive order aims to replace family separation with a policy that allows the US to detain families indefinitely. The one obstacle in his way is a 1997 court order, called the Flores settlement, that says children (with or without parents) can’t be detained for more than 20 days.

So the Trump administration wants Congress to overrule the Flores settlement, or for a judge to allow them to indefinitely detain families. My colleague Dara Lind has an excellent explainer on how the Trump administration is strategically picking this fight to get the legal authority for indefinite detention of families.

If the Trump administration abides by the Flores settlement — and for now, they aren’t saying they plan to violate the agreement — then families would need to be released after 20 days as they wait for a backlogged immigration system to work through its caseload. This would be a lot like how the process worked during the Obama administration.

However, the Trump administration is hoping that a judge or Congress quickly gives them the ability to detain families indefinitely so they don’t have to release these families (or even resort to family separation again).

To give you a better idea of what the current law says they must do — and what Trump wants Congress or a judge to allow — here’s a flowchart that compares those policies to the family separation policy: