President Trump finally got his Muslim ban.

Early in his administration, Trump officially tried to stop visitors from several majority-Muslim countries from entering the United States. When that ban was enjoined by the courts, he issued another, which was also stopped by the Ninth Circuit Court of Appeals, and which he quickly replaced with a final version that added Venezuela and North Korea, presumably to give it a less obviously discriminatory appearance. The reaction of lower courts against Trump created the hope that the judiciary would be the check on Trump's worst impulses that Congress has not been.

Today, however, these hopes were dashed by a supine Supreme Court. A bare 5-4 majority, breaking out on a straight party line with Trump's nominee Neil Gorsuch providing the critical fifth vote, upheld the president's travel ban, abdicating its constitutional responsibilities with a disgraceful opinion that history will not view kindly.

The Establishment Clause of the First Amendment forbids the government from treating people differently on the basis of their religion. While Trump's travel ban was neutral towards religion on its face, compelling evidence that its otherwise arbitrary selection of seven countries, five of them majority-Muslim, was motivated by religious bias is provided by Trump's own words. As the majority opinion acknowledges, Trump repeatedly expressed anti-Muslim animus as a candidate and described his first order as a "Muslim ban" after his inauguration. And as Justice Sonia Sotomayor points out in her dissenting opinion, a statement that was still on his campaign website in May 2017 Trump called for "a total and complete shutdown of Muslims entering the United States until our country's representatives can figure out what is going on." It's hard to imagine more compelling evidence of discriminatory intent, and Trump has never repudiated these statements.

Chief Justice John Roberts' defensive and highly unpersuasive opinion upholding Trump's order despite the incontrovertible evidence of anti-Muslim animus rests on a conclusion that "there is persuasive evidence that the entry suspension has a legitimate grounding in national security concerns." Given the traditional deference shown by the Court towards the executive when it's acting in the realm of national security, the Court therefore found that the order was probably constitutional and should be allowed to go into effect.

The Court has never held, however, that the deference owed to the president over national security was absolute. Indeed, in a protesting-too-much conclusion to his desultory opinion, Chief Justice Roberts acknowledges that the Court's upholding of FDR's internment of people of Japanese descent in Korematsu v. United States "was gravely wrong the day it was decided, has been overruled in the court of history." Even the context of world war, the chief justice acknowledges, should not immunize presidential actions taken out of racial or religious animus from judicial scrutiny.

These words, however, ring hollow in light of the Court's approval of an order plainly motivated by anti-religious bias and — contrary to the majority's assertion — justified by national security pretexts that are far from "persuasive." As Justice Sotomayor says in a powerful dissent joined by Justice Ruth Bader Ginsburg, "By blindly accepting the government's misguided invitation to sanction a discriminatory policy motivated by animosity toward a disfavored group, all in the name of a superficial claim of national security, the Court redeploys the same dangerous logic underlying Korematsu and merely replaces one 'gravely wrong' decision with another." The Court's apparent conclusion that the Court can serve as a check on racial and religious animus in the name of foreign security several decades in retrospect but not contemporaneously is cold comfort indeed.

The Court's holding in Trump v. Hawaii is particularly outrageous in light of its recent decision in Masterpiece Cakeshop. In that case, the Court found statements by civil rights commissioners that were qualitatively and quantitatively much weaker evidence of religious evidence sufficient to render an application of civil rights law unconstitutional. As Sotomayor argues, "the Court recently found less pervasive official expressions of hostility and the failure to disavow them to be constitutionally significant. It should find the same here."

Reflecting the very strong likelihood that Trump v. Hawaii will be regarded by history about as well as Korematsu, Justice Anthony Kennedy — author of the Masterpiece Cakeshop decision — wrote a brief and rather pathetic concurrence abdicating responsibility. "The oath that all officials take to adhere to the Constitution is not confined to those spheres in which the judiciary can correct or even comment upon what those officials say or do. Indeed, the very fact that an official may have broad discretion, discretion free from judicial scrutiny, makes it all the more imperative for him or her to adhere to the Constitution and to its meaning and its promise," Kennedy asserts, essentially imploring Trump not to be Trump.

But — as the chief justice's condemnation of Korematsu makes plain — it's simply not true that the president's order must be "free from judicial scrutiny" just because it has an alleged security justification. The Constitution remains in force; alleged national security concerns do not make constitutional an executive order motivated by religious animus. Like Justice Felix Frankfurter's claim in Korematsu that the racist order upheld by the Court was "their business, not ours," this is unconscionable buck-passing that will not withstand historical scrutiny.

Mitch McConnell's ability to keep a Supreme Court seat open for Trump is an act of massive historical significance. In case after case, Trump nominee Neil Gorsuch has provided a fifth vote to advance a Republican policy agenda from the Supreme Court. In this case, Trump's ability to nominate Gorsuch provided the decisive vote that prevented the Court from fulfilling its constitutional function and acting as a check on the discriminatory actions of the president. The world will suffer as a result.