There are plenty of reasons to be concerned about the Supreme Court’s majority opinion in Trump v. Hawaii, which upheld the president’s proclamation banning travel to the U.S. by people from several majority-Muslim countries. Top among them is that the opinion, while purporting to repudiate Korematsu v. United States (the widely condemned World War II-era case upholding the forced internment of Japanese Americans), replaces it with a modern-day version, relying on a bogus claim of “national security” to uphold a policy that is clearly based on religious animus. This is the poisonous core of the court’s ruling.

Then there is the opinion’s broadside attack on judicial review itself. The majority repeatedly suggests that courts have no business questioning the president’s judgments, not just on which foreign nationals may be admitted into the U.S. through the immigration process, but on any matter of “national security.” Never mind that national security policies are particularly likely to infringe on those very individual liberties that most require judicial enforcement, because they are designed to protect vulnerable minorities from the tyranny of the majority.

These aspects of the court’s decision are deeply problematic but, sadly, not surprising, given the justices’ questions at oral argument. There is one aspect of the court’s decision, however, that is simply baffling, and that’s the treatment of President Trump’s multiple anti-Muslim statements when speaking about the ban.

Observers have spent months debating how much weight, if any, the court would place on these statements. There seemed to be several possibilities. At one extreme, the justices could find that the entire case turned on these statements; at the other, they could refuse to look beyond the four corners of the proclamation itself, ignoring extrinsic evidence altogether. Or they could chart a middle path, weighing the president’s statements against the evidence (such as it was) of a national security justification. They could also distinguish the statements Trump made while in office from those he made on the campaign trail or from statements made by his aides and associates.

Nominally, at least, the majority did none of these things. It claimed to go beyond a mere four-corners review—i.e., it would not simply ask whether the president gave a facially bona fide and legitimate reason for the policy. Instead, it would conduct a “rational basis” review, in which the court determines whether a policy is rationally related to a legitimate objective. While that is indeed a very low bar, it allows limited probing behind the text of the document, in order to evaluate whether a legitimate objective exists and whether the policy relates to it. As Justice Roberts’ opinion acknowledges, the result of applying this standard was that “we may consider the plaintiffs’ extrinsic evidence.”

And yet, the court didn’t consider that evidence at all. The section of the opinion that performs the “rational basis” review contains not a single word about the president’s anti-Muslim statements, which are evidence that the president’s goal was to restrict the entry of Muslims into the United States, a clearly illegitimate objective under the Constitution. It addresses only the government’s evidence—such as the “worldwide review process” that the administration reportedly undertook—and the plaintiffs’ responses to that evidence.

This omission is inexplicable. The court has previously recognized, in cases like Romer v. Evans (which struck down an amendment to Colorado’s state constitution prohibiting laws barring discrimination based on sexual orientation), that a policy won’t survive rational basis review if the purported justification, even if legitimate on its face, is an obvious pretext for discriminatory animus. The majority in this case suggests that a justification may be deemed pretextual only if there is no plausible connection between the challenged policy and the justification. In other words, unless the justification is facially inapt, it cannot be considered a pretext.

This approach makes no sense as a matter of either logic or law. In areas touching on national security, it is generally child’s play for a government official acting on constitutionally impermissible motives to come up with a plausible-sounding pretext. Moreover, there are other ways to prove pretext—and to do so overwhelmingly—besides facial implausibility. Statements of discriminatory intent are rare, but where they exist, they are a far more powerful and direct indicator of animus than any inherent weakness in the “official” justification. Yet, under the majority’s analysis, the Muslim ban would stand even if the president had put down his pen after signing the bill, looked into the camera, and stated, “The goal behind this facially neutral policy is to deny Muslims equality and religious freedom.”

The court did not expressly hold that a president may intentionally discriminate on the basis of race or religion in national security policies, as long as he comes up with a pretext that has some minimal quantum of evidentiary support. But that is the functional outcome of the court’s approach. It is now up to the people and their representatives in Congress to watch the president very carefully, and to stand in, wherever necessary, for the role that the courts are supposed to perform: protecting the rights of the most vulnerable among us.

Photo by Mark Wilson/Getty Images