On February 19, 1942, President Franklin D. Roosevelt signed Executive Order 9066 “Authorizing the Secretary of War to Prescribe Military Areas.” Notably, the Order did not mention Japanese-Americans. It simply authorized “Military Commanders” to exclude “residents” from their communities in order to protect the western part of the country “against espionage and against sabotage.”

Acting under this authority, the military “relocated” over 110,000 Americans of Japanese ancestry to concentration camps. The order remained in effect for nearly three years.

On September 24, 2017, President Donald J. Trump issued Proclamation 9645 “Enhancing Vetting Capabilities and Processes for Detecting Attempted Entry Into the United States by Terrorists or other Public-Safety Threats.” Popularly known as the “Trump Travel Ban,” this document, while several times lengthier than Roosevelt’s Order, resembles that now-discredited document in at least one respect. Just as Roosevelt’s Order said nothing about those whom it targeted, Japanese-Americans, Trump’s Proclamation says nothing about Muslims.

In December of 1944, the Supreme Court voted, 6 to 3, to uphold Roosevelt’s Order (Korematsu v. United States). On June 26, 2018, the Supreme Court upheld the Trump Travel Ban, 5 to 4 (Trump v. Hawaii). Chief Justice Roberts wrote the majority opinion, while Justice Sotomayor wrote the principal dissent. You can almost boil down their contrasting views by saying that Roberts takes the Proclamations according to its words, while Sotomayor takes Trump at his word.

What I mean by this is that Roberts’ opinion considers the Proclamation as if it arrived out of the blue. True, Roberts says, President Trump has said and tweeted a number of anti-Islam statements, but the text of the Proclamation is what counts, “it says nothing about religion,” and federal law “exudes deference” to the President’s power to exclude non-citizens.

Here, the President has “found” that allowing the entry of “aliens” from certain countries, most of which are predominantly Muslim, would be “detrimental to the interests of the United States.” Applying the so-called “rational basis” test, and noting the elaborate “world-wide review” process built into the Proclamation, the decision ultimately rests on the President’s power to protect national security.

Most of his opinion is devoted to the details of the Proclamation, but the Chief Justice also considers whether Trump acted “for the unconstitutional purpose of excluding Muslims,” thereby preferring one religion over another. He chides Trump, indirectly, by citing as an example of the President’s “extraordinary power to speak to his fellow citizens,” President Washington’s 1790 letter to the Jews of Newport, Rhode Island, assuring them that the Government “gives to bigotry no sanction.” The implication is clear.

At this point, Roberts does what judges do. He “balances” the competing factors, the President’s authority, on the one hand, his intemperate remarks on the other. Yes, the Court may consider extrinsic evidence, but the “rational basis” issue is whether the President has given what looks like a legitimate reason. And here he has, so authority wins.

The opinion then takes a remarkable turn. It overrules Korematsu as “gravely wrong the day it was decided” and having “no place in law under the Constitution.”

Justice Kennedy wrote a brief concurring opinion, his last as a member of the Court. In response to the Government’s position that the Court had no power to review Trump’s Proclamation, he says that in some instances the Court may overturn presidential action where there is no explanation other than hostility to a particular religion.

I suppose that is reassuring to some degree, but it is hard to imagine a case where the evidence of “animus” could be much stronger than in Trump v. Hawaii.

And it’s not as if Trump’s beliefs have nothing to do with the travel ban. There is a straight line between the two. In June 2017, Trump tweeted, “what we need is a TRAVEL BAN,” and in September, just days before Proclamation 9645, he doubled down, going so far as to re-tweet inflammatory anti-Muslim videos.

In her dissent, Justice Sotomayor accuses Roberts of rendering a “highly abridged account” of Trump’s public statements. She minces no words, even citing Trump’s reliance on FDR’s 1942 Order as justification for his campaign promise of a “total and complete shutdown” of Muslims entering the United States. In her opinion, “a reasonable observer would conclude “that the Proclamation was driven primarily by anti-Muslim bias.” To her, it isn’t even close, and the Court has merely replaced “one gravely wrong” decision (Korematsu), with another.”

The Supreme Court is not in the business of national security policy, so whether the Trump Travel Ban is a bad idea, as many foreign policy experts believe, is not for the Court to decide. But if, as in Trump’s case, the candidate promises to keep Muslims out and then, upon becoming president, issues the first of three travel bans, the question becomes whether he can “cure” the problem by telling his advisers to come up with a way of doing it that’s “legal.”

Justice Sotomayor‘s answer is that a pretext is a pretext, and the third order is simply more of the same, clothed in bureaucratic legalese but motivated by anti-Muslim bias.

It is all well and Good for Justice Kennedy to remind the President that he should “adhere to the Constitution” and assure an “anxious world” that the United States remains committed to our constitutional liberties. But these are little more than an aspirational platitudes. In the context of this case, Justice Sotomayor has the better argument.

Public opinion may be with Trump, but in the long run our country will be the poorer for the outcome in this case, just as it was in Korematsu.