The directive raises a passel of new questions, and it’s not yet clear how it will function or what will change in practice. It appears likely that the order would violate a 1997 government agreement not to hold immigrant children, meaning that in the name of enforcing the law, the White House could be breaking it. Furthermore, the new order contradicts the president’s repeated claim that only Congress could fix the problem, and may paralyze efforts in Congress to end separations legislatively.

The current drama began in May, when Attorney General Jeff Sessions announced that under a new policy, all adults caught crossing the border would be held for criminal prosecution. Under a 1997 court settlement called the Flores agreement, however, children must be kept in the least-restrictive setting possible, effectively barring incarceration of children alongside their parents. As a result, the Trump administration has separated families. The change was an example of prosecutorial discretion: Previous administrations for the most part declined to criminally prosecute first-time border crossers; the Trump administration made the opposite decision, which was legal but, it turned out, politically perilous.

The order is Trump’s latest move in a zig-zag of often contradictory messages. Initially, and for some time afterward, he falsely claimed that the separations were the result of a law passed by Democrats. No such law exists. He also repeatedly said that only Congress could solve the separations. Other officials, including Homeland Security Secretary Kirstjen Nielsen, insisted that there was no policy to separate families, even as others, including Sessions, Chief of Staff John Kelly, and senior adviser Stephen Miller, defended the policy as justified and an effective deterrent. Then, on Tuesday, Trump flipped to forcefully defending the policy. “We must always arrest people coming into our Country illegally,” he tweeted. But behind the scenes, the pressure was building on Trump to take action.

Still, the action he took Wednesday is confusing, and confused. Mechanically, it uses an executive order piled atop the policy Sessions enacted in May, an ever more precarious structure. Having argued variously that there was no policy of separating families or that only Congress was able to solve the problem, Trump’s executive order suddenly acknowledges the matter is under executive-branch discretion and that Congress is not the only body that can fix it.

Legally, however, it’s unclear whether the executive order will withstand scrutiny. While Congress could pass a law that would circumvent the 1997 Flores agreement, the executive branch remains bound by the settlement. Trump’s order decrees that rather than be separated, children should be kept with their parents who are detained. The order states that the government will ask a court to modify the Flores agreement, but detaining children with parents almost certainly violates the Flores agreement, as Flores v. Lynch, a 2016 court ruling against the Obama administration, stated.