The new measure raises a new set of problems for the Trump administration. The most pressing is finding where to house adults and children together. In his order, Trump made the US Defense Department responsible for finding facilities for that purpose, even if it means building new ones. He’s also enlisting other agencies to help care for the detainees.

Trump is also bracing for legal challenges. His family detention policy likely violates a court settlement that mandates how the federal government should treat immigrant children. Under the Flores settlement, authorities are not allowed to hold children for long periods of time. After immigrant advocates sued the Obama administration for locking whole families in detention, a federal court extended the Flores protections to children traveling with relatives. (It was those protections that Trump was trying to skirt by separating adults from children.) The Trump administration will likely be subject to the same kind of lawsuit.

The executive order instructs attorney general Jeff Sessions to ask for the federal court’s permission to change the terms of the Flores agreement so that the families can be kept in custody until their cases are resolved. Republicans in Congress had also come up with several proposals to detain children along with their parents, though their chances of passing are slim.

Even if Trump’s haphazard strategy fails legally, he’s likely already succeeded in changing perceptions. Next to separating families, jailing them together might seem like a better option, says Pratheepan Gulasekaram, a law professor at Santa Clara University.

“Because of the extremes of government and human behavior, we’re becoming numb to what eight years ago was already a horrific thing, to lock up families that are coming to seek asylum in the US,” he added.

But don’t expect the change in policy to end the Trump administration’s public relations crisis. Immigrant advocates immediately condemned family detention. They are unlikely to let up on their scrutiny over how the federal government handles immigrants. “Our experience defending families in detention, first in Artesia, New Mexico and now in Dilley, Texas, has taught us that family detention is never humane,” said Beth Werlin, executive director of the American Immigration Council, in a statement.

The ACLU weighed in as well.

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.