On Thursday afternoon, when a three-judge panel of the Ninth Circuit Court of Appeals ruled, unanimously, against President Donald Trump, it emphasized that it was well aware that courts "owed substantial deference" to the executive branch on matters of immigration and national security. That was "an uncontroversial principle that is well-grounded in our jurisprudence," the judges noted in their decision, which concerned the President’s banning people from seven countries, and all refugees, from entering the United States. But ordinary deference had not been enough for Trump. Instead, the judges wrote, with what sounded like dismay, the government had "taken the position that the President’s decisions about immigration policy, particularly when motivated by national-security concerns, are unreviewable, even if those actions potentially contravene constitutional rights and protections."

In the case, the Trump Administration had argued that judges shouldn't even be able to hear from those who believed that their rights had been violated by the executive order; any review would pretty much be confined to making sure it was written in the right form. Trump thought he could do what he wanted, without having to explain it to any "so-called judge." The appeals-court judges—William Canby, Richard Clifton, and Michelle Friedland—disagreed. "There is no precedent to support this claimed unreviewability," they wrote, adding that the treatment Trump had expected "runs contrary to the fundamental structure of our constitutional democracy."

The force of this rejection of Trumpism could be seen in the President's response, which came on Twitter, and in all capital letters: "SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!" "See you in court" has been the line that the A.C.L.U. and others have said to Trump, and so it was a little odd to hear him try to make it sound like a threat. On Tuesday, after the panel heard the oral arguments on the stay, Trump railed against the idea that he should ever have to be in court—any court, let alone the Supreme Court, where this case, very likely, is headed. But nothing becomes Trump so much as a contradiction wrapped in a declaration of national danger and crisis.

The Ninth Circuit made it clear, however, that there was a recognized role for courts even in times of war—perhaps especially in those times. One of the citations in the decision came from Boumediene v. Bush, a case brought by a Guantánamo detainee: “ 'political branches' lack 'the power to switch the Constitution on or off at will,' ” the judges wrote.

They also made it clear that they saw significant constitutional issues in the case before them, which had been brought by Washington State and was joined by Minnesota. The states argued that the executive order violated a raft of constitutional provisions and laws, notably the due-process clause and the establishment clause. (There are dozens of lawsuits, across the country, challenging the executive order. A number of the plaintiffs are individuals who were stranded or detained or saw their visas abruptly revoked.) A federal judge in Seattle had agreed to hear them out, and meanwhile issued a temporary restraining order, with national effect, preventing the Trump Administration from enforcing his ban. The Administration had asked for an emergency stay of that restraining order. To get it, the government had to show that it had a likelihood of success on the merits, that it would suffer irreparable harm if it didn't get a stay, and that the stay would, on the whole, be in the public interest.

All three judges agreed that the Administration had not demonstrated that it was likely to succeed with regard to the due-process claim, because it had not shown that "the Executive Order provides what due process requires." They appeared to attribute the failure to the government’s very indifference to its constitutional commitments: "The Government argues that most or all of the individuals affected by the Executive Order have no rights under the Due Process Clause"—and thus it didn’t have to worry about due process. This was, as the judges saw it, demonstrably false: “Indeed, the existence of such persons is obvious.” Non-citizens who are in this country, for example, do have certain rights; the courts have long recognized that, and the fact that it seems counterintuitive to Donald Trump is immaterial. As with the question of reviewability, the Administration, as the court saw it, hadn't even tried to engage the Constitution in a serious way.

The Trump Administration also had a credibility problem with the judges when it came to green-card holders. The Administration now says that the order does not apply to those people, but it has gone back and forth on that point. The judges said that they could not rely on how the Administration interpreted the order at any given moment. They had to assume that, unless the order was revised, green-card holders could be swept up again.

Similarly, the judges were unwilling to dismiss the states' argument that the executive order violated the establishment clause of the First Amendment—that is, that its purpose was religious discrimination against Muslims. Trump had, after all, promised during his Presidential campaign to keep Muslims out of the country. The government had argued in court that because Muslims weren't specifically mentioned in the order, there could be no question of religious discrimination. The judges noted that a specific, blatant announcement of an intent to discriminate was not the standard for judging whether a law intended to discriminate. They didn't reach a conclusion about which side appeared likely to succeed on this claim, but they said that the discrimination question was a "serious" one that ought to be discussed.

One hurdle that the State of Washington had to clear, in bringing the case, had to do with “standing,” which means that it had to show that it was harmed by the executive order. It had argued that it had standing on a number of grounds, including an interest in the rights of its non-citizen residents. But the judges gave it standing for a more direct reason: Washington’s state-university system is a state agency, and the state had pointed to specific scholars and students who were harmed by the order, as well as to ways that the schools’ academic mission was compromised. In effect, it was the state’s commitment to public education that gave it a chance to confront President Trump in court.

Against all of that was the Trump Administration's claim that the temporary restraining order was causing irreparable harm—that this was an “emergency.” But who or what was being harmed? Keeping the restraining order in place, after all, would simply maintain, for a few more weeks, procedures that have been followed for years, while the judge in Seattle did his work. "Although we agree that the Government’s interest in combating terrorism is an urgent objective of the highest order,” the judges wrote, the government had "done little more than reiterate that fact," turning down “invitations” to tell it more, including classified concerns, which the court, as the decision pointed out in a footnote, is allowed to hear. It wasn't enough to say that the world was, generally, a dangerous place—the judges already knew that.

The Trump Administration had made one more specific claim of irreparable harm to the "separation of powers," by which it appeared to mean that harm would be done to the President's power. The judges seemed puzzled by this, since "that injury is not 'irreparable' ”: the President would be able to act if he won in court. Perhaps, in the Administration’s thinking, the risk was not really to the Presidency as a constitutional office but to the idea that this President could do whatever he wanted. The irreparable harm would be done to his ability to boast. The judges may not have realized that, for Donald Trump, that counts as an emergency. Or maybe they understood it all too well.