On Tuesday, a crack opened in a cornerstone of America: religious freedom.

By a 5-4 vote, the U.S. Supreme Court ruled in favor of President Donald Trump’s travel ban aimed at mostly Muslim nations. Under the ban, people from those nations generally are not allowed to emigrate here, nor are they allowed to work, study or take vacations in the United States.

EDITORIAL

The court’s conservative majority argued — “pretended” might be a more accurate word — that Trump’s travel ban could not rejected as unconstitutionally discriminatory, no matter how many times he called it a “Muslim ban,” because those explicit words appear nowhere in the final version of the ban. The ban, wrote Chief Justice John Roberts, is “neutral on its face.”

What a specious argument. After two rewrites, Trump’s ban on Muslims might finally be “neutral on its face,” but if you lift the hood and take a peek, it is blatantly clear that the president’s bigoted intent remains unchanged.

In essence, the court’s ruling opens the door to religious discrimination so long as you disguise it as something else, such — as in this case — a matter of national security.

None of the the lower courts that looked at this issue agreed with the Supreme Court’s thinking. And future historians are likely to view the court’s decision as a sad day for America and the First Amendment.

All evidence points to religious discrimination as Trump’s sole motivation for imposing the travel ban, which bars travelers from seven countries, six of which have Muslim majorities. Everything Trump said as a candidate and everything he tried to do with two previous bans, which were less disguised, stand as proof of his intent.

Allow us to quote Justice Sonia Sotomayor, who gets to the heart of the matter in a dissenting opinion:

“A reasonable observer would conclude that the proclamation was motivated by anti-Muslim animus. The majority holds otherwise by ignoring the facts, misconstruing our legal precedent, and turning a blind eye to the pain and suffering the proclamation inflicts upon countless families and individuals, many of whom are United States citizens.”

Trump’s travel ban, Sotomayor also wrote, “masquerades behind a facade of national security concerns.”

In issuing its opinion, the majority reversed Korematsu v. United States, which in 1944 permitted Japanese-American citizens to be incarcerated during World War II in the name of national security. Hurray for the court, finally righting a historic wrong. But in also upholding the constitutionality of the travel ban, as Sotomayor wrote, the court “merely replaces one gravely wrong decision with another.”

Trump says his travel ban will make America safer. It will not because it is entirely unnecessary. Hordes of terrorists have not been pouring through customs from those seven countries.

The ban will only lower our standing in the eyes of other nations, further distancing us from our allies and making us less safe.

The court’s majority took pains to stress that it was ruling only on the constitutionality of Trump’s travel ban, not on its wisdom. As Justice Anthony Kennedy, who voted with the majority, wrote: “An anxious world must know that our government remains committed always to the liberties the Constitution seeks to preserve and protect, so that freedom extends outward, and lasts.”

Problem is, Justice Kennedy is talking through his hat. After Tuesday’s ruling, nobody should feel quite so confident that our government “remains committed always” to our nation’s most precious liberties, beginning with freedom of religion.

What we hear in Kennedy’s lofty pronouncement is another masquerade.

Send letters to letters@suntimes.com.