In a pair of religious freedom rulings this month, the Supreme Court took dramatically different approaches to a basic constitutional question: When does anti-religious hostility by government officials violate the religious liberty guarantees of the First Amendment?

The wildly divergent results in those two high-profile cases — Masterpiece Cakeshop v. Colorado Civil Rights Commission, and Trump v. Hawaii, the Muslim ban case — send troubling mixed messages, which threaten to undermine religious freedom, fairness, and equality for all.

In a deeply divided 5-4 decision handed down on Tuesday, the court upheld President Trump’s Muslim ban, allowing the federal government to target Muslims worldwide based on unfounded fears and bare religious animus. In the face of Trump’s repeated, unambiguous statements condemning Islam and Muslims, the Supreme Court essentially gave the president a free pass to vilify an entire faith and enshrine that bigotry into national immigration policy.

The short and stormy history of the policy is, by now, well known: On the heels of Trump’s central campaign promise of a “total and complete shutdown” of Muslim immigration, he issued a series of travel bans, using territory as a proxy for religion and imposing severe, indefinite entry restrictions on individuals from certain Muslim-majority countries. In upholding the latest version of the ban, the court effectively ignored the overwhelming evidence of unmistakable anti-Muslim bias underlying the policy, crediting superficial changes the president made in response to court rulings that blocked earlier versions of the ban. As a result, the ban will continue to upend people’s lives, tear apart families, and send a disgraceful message that Muslims are not welcome here.

The Muslim ban decision comes only weeks after the Supreme Court, in the Masterpiece Cakeshop case, bent over backwards to find religious hostility, despite a much weaker factual record. In Masterpiece, the court ruled in favor of a Christian-owned bakery in Colorado that had refused to sell a wedding cake to a gay couple on the same terms as all other customers.

In that case, the court found religious animus based on three pieces of flimsy evidence: First, it noted that in public hearings on the bakery’s discrimination, one of the seven Colorado civil rights commissioners said that “it is one of the most despicable pieces of rhetoric that people can use to — to use their religion to hurt others.” The court also cited another commissioner’s statement that the bakery’s owner can believe “what he wants to believe,” but he can’t act on that belief “if he decides to do business in the state” — a statement that even the majority opinion conceded was “susceptible of different interpretations.” Finally, the court saw evidence of religious hostility in the state commission’s refusals to pursue complaints against three other bakeries that had declined to make cakes with anti-gay messages.

Taken together, those three examples amount to very little. The commission’s dismissal of complaints against the other bakeries merely reflected the fact that, unlike Masterpiece Cakeshop, those businesses didn’t violate the state’s civil rights law, as the bakeries would have declined to make the requested anti-gay cakes for any customer, regardless of the customer’s faith. As for the commissioners’ statements, the use of the term “despicable” was unfortunate, but it’s well-settled constitutional law that religion can’t be invoked to harm others and that businesses can’t use religion to avoid complying with neutral anti-discrimination rules.

In any event, even if the commissioners’ statements had demonstrated some religious hostility, the statements cited by the Supreme Court were made by only two of the seven-member civil rights commission, and they occurred in only one stage of an extensive, multi-layered process that also included independent decisions by the Colorado Civil Rights Division, an administrative law judge, and the Colorado Court of Appeals. As Justice Ginsburg, joined by Justice Sotomayor in dissent, explained, “Whatever one may think of the statements in historical context, I see no reason why the comments of one or two Commissioners should be taken to overcome [the baker’s] refusal to sell a wedding cake” to the same-sex couple.

Fortunately, the Masterpiece Cakeshop decision rested on extremely narrow grounds, with the court focusing heavily on the supposed evidence of bias against the bakery owner’s Christian faith. The bakery — with support from the Trump administration — had sought a much broader ruling, one that would have created a new, sweeping First Amendment right to discriminate in the marketplace. But the court declined the invitation, basing its decision on the unique facts of the case and reiterating the “general rule” that “religious and philosophical objections ... do not allow business owners ... to deny protected persons equal access to goods and services.” So, while the business won the battle in Masterpiece, it lost the larger war over discrimination in public accommodations.

Still, the court’s aggressive efforts to root out anti-Christian animus by the Colorado Civil Rights Commission were notable, especially in light of its decision today to ignore far more compelling and egregious religious hostility in the Muslim ban case.

In contrast to Masterpiece Cakeshop, the evidence of anti-religious animus in the Muslim ban case is unambiguous and consistent. And it all flows from President Trump, the person singularly responsible for the policy. Throughout his presidential campaign, Trump explicitly and repeatedly disparaged Muslims and Islam — saying, for example, that “Islam hates us” and “we’re having problems with Muslims coming into the country.” He also formally called for a “shutdown of Muslims entering the United States” in a statement that remained on his campaign website well into his presidency.

Just one week after his inauguration, the president put that call into action with an executive order that targeted Muslim-majority countries and included thinly veiled attacks on Muslim communities at home and abroad. Trump confirmed that countries were simply used as a stand-in for religion in the ban, explaining that he had moved to “talking territory instead of Muslim” because “[p]eople were so upset when I used the word Muslim.” Lest there was any doubt about his intent, Trump proudly proclaimed on a national Christian broadcast network that the order was crafted to favor Christian over Muslim immigrants. Indeed, nearly all — over 97 percent — of the hundreds of millions of people affected by the initial version of the ban were Muslim.

Later versions followed the same basic blueprint, and the president has continued to demean Muslims and their faith throughout the process. Among other statements, he endorsed a false story involving General Pershing and the supposed massacre of Muslims dipped in pigs’ blood. More recently, the president personally retweeted a series of flagrantly anti-Muslim videos, which his administration then expressly connected to the Muslim travel ban. Throughout the entire process, whether discussing the ban or Islam in tweets or in the press or defending it in court, Trump has never retreated from or apologized for any of his blatantly anti-Muslim rhetoric.

In Masterpiece Cakeshop, the Supreme Court relied on meager evidence of bias to hold that government disparagement of religion is “inappropriate for [an official] charged with the solemn responsibility of fair and neutral enforcement” of the law. If the thin record in Masterpiece supports a finding of impermissible hostility, then the mountain of unapologetic, cruel statements from the president in the Muslim ban case surely do, too.

Remarkably, in upholding the Muslim ban, the court didn’t even try to reconcile the two cases. In fact, neither the majority nor concurring opinions even cited the Masterpiece Cakeshop decision (though the dissents certainly did). Instead, a majority of the court merely declared that because the Muslim ban arose in the context of immigration and national security, it enjoys the most deferential level of judicial review. In other words, once the court concluded that the government’s claimed nonreligious reasons for the ban were “plausible,” it treated the president’s explicit, unequivocal, anti-Muslim animus as irrelevant. But as Justice Sotomayor explained in dissent, not only is the majority’s application of a different standard in this context wrong, but the Muslim ban fails to meet even the low bar of the “rational basis” review that a majority of the court purported to apply.

In Masterpiece Cakeshop, the Supreme Court emphasized that fundamental religious freedom “bars even subtle departures from neutrality on matters of religion.” The First Amendment, the court explained, “commits government itself to religious tolerance, and upon even slight suspicion that proposals for state intervention stem from animosity to religion or distrust of its practices, all officials must pause to remember their own high duty to the Constitution and to the rights it secures.”

If only the Supreme Court had applied that standard a few weeks later to the president and his Muslim ban.