The Supreme Court overturned the Ninth Circuit’s ruling against President Trump’s travel ban on Tuesday in Trump v. Hawaii. In an opinion by Chief Justice John Roberts, the court held Trump’s order banning people from several foreign countries from entering the United States was constitutional and consistent with the power granted him in the Immigration and Nationality Act (INA).

That the court held the so-called “travel ban” to be constitutional is not surprising; the Ninth Circuit is the most often overruled appeals court and its holdings are often at odds with mainstream jurisprudence. What is shocking is that the decision was 5-4, not 9-0. That four justices — including the more thoughtful members of the court’s Left — were willing to adopt a radical theory of intent-based law shows how deep the rot of Trump Derangement Syndrome goes, and how far activists in the judiciary will go to thwart the man they hate, even when he acts strictly within the rule of law.

The travel ban, which went into effect in its current form in March 2017, barred nationals of several foreign nations (some of which are majority-Muslim nations) from entering the United States, stating that each of those countries “is a state sponsor of terrorism, has been significantly compromised by terrorist organizations, or contains active conflict zones.” The order set up a period of administrative review in which its terms might have been further refined. It was also challenged immediately in court.

District Courts in Hawaii and Maryland quickly entered injunctions against the order, which were just as quickly appealed. Writing at the time of the district courts’ opinions, Mollie Hemingway noted the enormous problem with the rulings:

Trump said the temporary travel restriction was needed for national security. In issuing his temporary restraining order, Watson said Trump’s order was a result of nothing more than religious animus against Muslims. The judge’s order is predicated on what he thinks Trump wants to do, not the order itself. Throughout the ruling, Judge Watson concedes there’s nothing about the executive order that would be problematic if not for his interpretation of Trump’s statements made in the months and years prior to issuing it. He repeatedly states his feeling that Trump had a bad motive in issuing the order.

New Ruling, Same Nonsense

The Ninth Circuit affirmed the ruling but not its bizarre reasoning. Their holding, equally unmoored from reason or precedent, was that while the INA “vests the President with broad powers to regulate the entry of aliens,” it is also true that “[t]hose powers … are not without limit.” That would be reasonable as far as it goes, except that the Ninth Circuit judges failed to identify any such limit in the INA or in the Constitution. They wrote that Trump’s order “conflicts with the statutory framework of the INA by indefinitely nullifying Congress’s considered judgments on matters of immigration,” but fail to identify the provision with which it actually conflicts.

That is because there is no such provision. Congress granted the president broad discretion in enforcing the immigration laws. Ignoring the text, which they admit would allow for the president’s actions, the Ninth Circuit suggested a “holistic review,” including consideration of the “statute’s legislative history … congressional policy… and ‘common sense as to the manner in which Congress is likely to delegate a policy decision of such economic and political magnitude.’”

The law — the thing that passed both houses of Congress and was signed by the president in accordance with the Constitution — is not enough for the Ninth Circuit. They need to mix in “common sense.” And when the court itself gets to define “common sense,” what do you know? They get to call something illegal whether it was in accordance with the law or not. (The case they cite for this theory of interpretation, FDA v. Brown & Williamson, dealt with whether the FDA had authority over tobacco, a completely inapposite point here since no one doubts that in INA Congress explicitly delegated this very power to the president.)

All of this talk of “common sense” and “holistic reviews” is the Ninth Circuit’s way of avoiding the nonsensical implications of the Hawaii court’s ruling, that Trump’s campaign rhetoric against Muslim immigration somehow removes from him the power to act under the INA, even though any past or future president would retain that power.

The Supreme Court rejected the Ninth Circuit’s eccentric ruling, as it often does. Chief Justice Roberts’s opinion for the Supreme Court begins with the law: “Under the Immigration and Nationality Act, foreign nationals seeking entry into the United States undergo a vetting process to ensure that they satisfy the numerous requirements for admission.

The act also vests the president with authority to restrict the entry of aliens whenever he finds that their entry ‘would be detrimental to the interests of the United States.’” The INA, as Roberts puts it, “exudes deference to the President in every clause.” It gives him wide authority what restrictions he may impose, on whom, and for how long. Roberts makes all of these points with citations to the text of the law, a refreshing change after the lower court’s mystical holism.

Trump’s order gave his reasons, but the plaintiffs say that those reasons are not good enough, or else are just a smokescreen for Trump’s real reason: an animus against Muslims. As the court notes, no such rationale has ever been demanded of previous presidents. The court also cites orders by presidents Ronald Reagan and Bill Clinton, which explained temporary exclusions of certain aliens with a single sentence.

Although only some of the countries named in the order are majority-Muslim countries, the plaintiffs sought to paint the order as prejudiced against that faith. They cite a section from a different area of immigration law concerning immigrant visas to back up their point, but Roberts and the majority were not fooled. Roberts notes that the provision they cite has never been construed as a limit on the one at issue here and that “presidents have repeatedly exercised their authority to suspend entry on the basis of nationality,” as Trump’s order does.

Having established what the law says and that Trump did not violate it, Roberts turns to Trump’s speeches about Islam and whether things he said on the campaign trail can invalidate his authority as president. The answer, which should surprise no one who has thought about it for a second, is no, they cannot.

The very idea is insane. If the law gives the president a power and that power does not violate the Constitution, then any president may exercise it. Going beyond even ordinary lefty rejection of textualism, the plaintiffs in Trump v. Hawaii say the Supreme Court must ignore the text entirely when the motives behind an action are impure. Hillary Clinton could have issued this order were she president because she is good; Trump is bad, so he cannot. And who would determine bad and good? The unelected courts, of course.

This is a serious error in judgment. The president’s words against Muslims may indeed have been hateful and wrong. But campaign speeches do not carry the force of law. They cannot enlarge a president’s powers, nor can they shrink them. The president is not a king whose every word is law. He is the chief executive of a republic, and his powers are those delegated to him by Constitution and statute. No more, no less.

“Plaintiffs argue that this president’s words strike at fundamental standards of respect and tolerance,” Roberts writes, “in violation of our constitutional tradition. But the issue before us is not whether to denounce the statements. It is instead the significance of those statements in reviewing a presidential directive, neutral on its face, addressing a matter within the core of executive responsibility.” As long as the order has a rational basis — which the court says that it does — looking behind the order to discern a secret motive is inappropriate.

‘I Don’t Like It’ Doesn’t Mean ‘It’s Unconstitutional’

The plaintiffs in Trump v. Hawaii would have the Supreme Court invent a principle that the president’s powers are reduced when he says nasty things. That idea is found nowhere in our Constitution or caselaw. If the president has the power to do something under the law, he has that power whether he is a jerk or not, whether he acts for the “right” reasons or the “wrong” ones. If a different president would have had this power under law — something no one disputes — it is ad hoc madness to say that this president does not have that power.

In Marbury v. Madison, Chief Justice John Marshall wrote that “it is emphatically the province and duty of the judicial department to say what the law is.” It went without saying in those more enlightened times that it was not the province of the judiciary to say whether the law is being used by someone who, in their opinion, is using it for the wrong reasons.

The dissenters, led by Justice Sonia Sotomayor, try to get around this by claiming that the law has no rational basis. But they do so, as Roberts notes, “by refusing to apply anything resembling rational basis review.” What they are really doing, as Roberts writes, is expressing their disapproval of the order and their opinion of the man issuing it. They “challenge the entry suspension based on their perception of its effectiveness and wisdom. They suggest that the policy is overbroad and does little to serve national security interests. But we cannot substitute our own assessment for the Executive’s predictive judgments on such matters,” the chief justice concludes.

There is a difference between thinking something is a bad idea (and you could easily argue that the travel ban is a bad idea) and claiming it has no rational basis and is therefore void. The plaintiffs, the district court, the Ninth Circuit, and Sotomayor are committing a cardinal sin of jurisprudence: coming up with the answer they wish was true and working backward to invent a legal justification for it.

But even if they are correct that the travel ban order is terrible, that does not mean it is illegal or unconstitutional. We in this country are governed by laws, not by a judge’s personal morals. It may be at times that the laws we have do not exactly match our idea of right and wrong, but the answer in that case is to change the law, not to pretend it doesn’t say what it very clearly says.

Many of us found the president’s comments on Muslims to be wrong and hateful, and many of us find the travel ban to be the wrong way of improving our national security. But the theory advanced by the plaintiffs here would be of greater harm still to the rule of law and would create a system in which judges do not “say what the law is” but, rather, say what they think it ought to be. That is the beginning of the end for representative government. That four of nine justices cared more about their personal feelings than the rule of law is far more dangerous to this republic than anything President Trump has ever done.