Alex Wroblewski / Bloomberg / Getty

In a bravura interagency pageant of incompetence, the Trump administration managed today to wrest defeat from the jaws of victory. The Supreme Court decided in favor of the “Dreamers” in Department of Homeland Security v. Regents of the University of California, the blockbuster case weighing the fate of the Deferred Action for Childhood Arrivals (DACA) program announced in 2012 by the Obama administration. The impressive thing about the loss was that its reason was precisely the same one that cost Donald Trump his coveted victory in Department of Commerce v. New York, the high-profile “citizenship question” census case last year.

The Court held, 5–4, that the administration’s purported “rescission” of DACA was “arbitrary and capricious,” and thus had to be, at the very least, redone. At least for now, America’s Dreamers can stay.

Chief Justice John Roberts wrote the majority opinion, joined by Associate Justices Ruth Bader Ginsburg, Stephen Breyer, Elena Kagan, and Sonia Sotomayor. Today’s decision focused entirely on the administration’s ham-fisted botching of Administrative Procedure Act requirements. Roberts’s opinion left open the possibility that a properly executed rescission might stand. It wasn’t all good news for the Dreamers, though: Citing President Trump’s frequent attacks on immigrants, they had asked the Court to hold that the rescission also violated the equal-protection requirements of the Fifth Amendment—the hoped-for kiss of death for a new attempt. A hornbook principle of constitutional law is that the government can’t do much of anything just on the grounds that it hates (or feels “animus” toward) certain kinds of people. But four of the five justices in the majority demurred.

Sotomayor was alone in arguing that “‘the words of the President’ help to ‘create the strong perception’ that the rescission decision was ‘contaminated by impermissible discriminatory animus.’” In a one-page concurrence, she pointed out that Trump has described Mexican immigrants as “‘people that have lots of problems,’ ‘the bad ones,’ and ‘criminals, drug dealers, [and] rapists,’” and as “‘animals’ responsible for ‘the drugs, the gangs, the cartels, the crisis of smuggling and trafficking, [and] MS13.’” The other four justices in the majority dismissed those statements as “unilluminating.”

Two things are now clear. First, the nearly 700,000 DACA recipients currently in the program need not fear lightning Immigration and Customs Enforcement raids for a while longer. Second, their fate, like so much else that matters in American life, will be squarely on the November presidential ballot.

The administration’s basic approach to administrative procedures was unwittingly summed up best by Trump himself in March. Asked whether he took responsibility for the federal government’s botched response to the coronavirus pandemic, he proclaimed, “I don’t take responsibility at all.” It was all the fault of regulations and decisions made by Barack Obama, Trump explained.

Major Trump decisions are always someone else’s fault. In the census case, the citizenship question wasn’t added for any political or even policy reason—it was there, the administration insisted with a nearly straight face, because the Department of Justice insisted that it needed the question to enforce the Voting Rights Act. Four justices pretended to believe that, but Roberts wouldn’t go that far.

In the case of DACA, Attorney General Jeff Sessions announced on September 5, 2017, that the rescission was necessary because DACA had been created by the Obama administration “without proper statutory authority,” and thus constituted “an unconstitutional exercise of authority by the executive branch.”

There were, and are, respectable arguments to be made that he was right. But the fact is, Sessions didn’t bother to make them. And when Acting Homeland Security Secretary Elaine Duke followed up with an order winding down DACA, she didn’t either.

The cursory argument, unaccompanied by detailed analysis, was that the Fifth Circuit Court of Appeals had struck down a different, later, and much larger program called Deferred Action for Parents of Americans (DAPA). That decision was affirmed by a 4–4 decision of the Supreme Court in 2016, then one justice short.

Sessions said that the DAPA decision meant that DACA too was unlawful. He didn’t bother to explain why. But the DAPA program was significantly different from DACA, and the reasons the appeals court gave for striking down DAPA didn’t apply to DACA. It was, all in all, a Lionel Hutz–level performance by the attorney general.

Three district courts immediately enjoined the rescission as arbitrary; one of the district judges blocking it gave the Department of Homeland Security a 90-day grace period to offer a genuine explanation for why DACA was illegal. The new homeland-security secretary, Kirstjen Nielsen, responded with a boilerplate memo basically just saying that she had no need to rethink the decision, because DACA was unlawful. But that, under administrative law, was not the only thing she was supposed to decide: There were issues of how to wind down the program, and how to protect those who relied on it, that she barely nodded to.

In the litigation that followed, the administration’s approach was “We don’t got to show you no stinking reasons.” These questions were, in the words of the Administrative Procedure Act (APA), “committed to agency discretion by law,” and thus no business of judges.

That none-of-your-business argument is sometimes correct, but it has become the solicitor general’s go-to trope under Trump in a wide variety of areas, and may be wearing a bit thin. In this case, the government argued that DACA itself was a simple “nonenforcement” decision, and thus not reviewable in court. But the majority wasn’t having it. DACA set complicated procedures and offered benefits (relief from deportation), Roberts wrote; that was reviewable.

The Sessions memo and the rescission memos, Roberts then wrote, did not come close to fulfilling the APA’s procedures: “DHS was ‘required to assess whether there were reliance interests, determine whether they were significant, and weigh any such interests against competing policy concerns,’” Roberts wrote. The agency did not even pretend to do that.

Here, the opinion touched on what we all know the case really was about—the lives of DACA recipients and of the extended families, communities, and institutions they live and work in. These people have emerged from the shadows and registered with DHS, thus putting themselves at risk if the program is ended. Everyone (even Trump in a rare moment of calm) acknowledges the hardship an end to DACA will inflict upon people simply for having been brought here as children.

Roberts’s opinion was careful not to say that these “reliance interests” will make any rescission unlawful; it said that the law required DHS to examine them and explain its decision to override them. “DHS may determine, in the particular context before it, that other interests and policy concerns outweigh any reliance interests,” Roberts wrote. “Making that difficult decision was the agency’s job, but the agency failed to do it.”

Without foreclosing a new rescission, this part of the opinion served notice that five justices are listening to the argument that lives are at stake, and that an end to DACA will take a toll not just on DACA recipients themselves, but that it will extend to “200,000 U. S.-citizen children, to the schools where DACA recipients study and teach, and to the employers who have invested time and money in training them.” If in fact those real people and real lives have infiltrated the judicial imagination, that would bode ill for a new rescission coming before this Court.

That does not, however, mean that rescission is dead. The administration, if it wants one, gets a do-over. “The appropriate recourse,” Roberts wrote, is “to remand to DHS so that it may consider the problem anew.”

DHS may be able to find a better lawyer than Jeff Sessions this time. If it does, Roberts, at least, seems disposed to consider the new arguments. If he is persuaded, his vote would pair with the other four—whom I have begun to call the “Trump bloc”—who thought this rescission was perfectly legal. Justice Clarence Thomas, in a dissent joined by Justices Samuel Alito and Neil Gorsuch, argued that the original DACA program was, in his judgment, illegal, and that its rescission was thus clearly legal. Thomas accused the majority of political judging: “Today’s decision must be recognized for what it is: an effort to avoid a politically controversial but legally correct decision,” he wrote.

Justice Brett Kavanaugh, in a separate dissent, suggested that the “DACA was illegal” issue is not relevant, since the agency should be able to rescind its decision any time it wants to.

If the administration goes ahead with another try at rescission, the next challenge will be heard after November.

This story is part of the project “The Battle for the Constitution,” in partnership with the National Constitution Center.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.