The U.S. Supreme Court issued a narrow ruling Monday in favor of a Christian baker who declined to bake a custom wedding cake for a same-sex wedding, concluding a state agency did not apply anti-discrimination law in a neutral manner.

Though the baker prevailed in Monday’s decision, the Court’s decision is narrow in the sense that the ruling is carefully fact-bound and does not address the major First Amendment question the case raised.

Justice Anthony Kennedy wrote the opinion for a seven-justice majority. Justice Ruth Bader Ginsburg dissented, joined by Justice Sonia Sotomayor.

The case was occasioned when David Mullins and Charlie Craig, a gay couple, entered Jack Phillips’ Masterpiece Cakeshop in Lakewood, Colo in 2012. After a short discussion with the prospective patrons, Phillips said he would not sell them a custom wedding cake due to his deeply-held religious beliefs. Mullins and Craig filed a complaint with the Colorado Civil Rights Commission, prompting a lengthy legal battle culminating in an appeal to the high court.

Kennedy explained that the Colorado law can validly protect LGBT patrons, but found the state agency applied the law in a manner hostile towards Phillips’ evangelical beliefs.

“As the record shows, some of the commissioners at the commission’s formal, public hearings endorsed the view that religious beliefs cannot legitimately be carried into the public sphere or commercial domain, disparaged Phillips’ faith as despicable and characterized it as merely rhetorical, and compared his invocation of his sincerely held religious beliefs to defenses of slavery and the Holocaust,” Kennedy wrote.

He also noted that the commission’s decision respecting Phillips was inconsistent with its treatment of similar disputes. On three occasions the state civil rights division found in favor of merchants who declined to create cakes conveying messages disparaging same-sex couples or promoting orthodox Christian belief. (RELATED: Supremes Lift Decision Ordering Trump Administration To Facilitate Abortions For Alien Minors)

In those instances, the agency concluded that the expression requested could reasonably be attributed to the bakers, justifying their refusal to accommodate the patrons. Those decisions also explained that the bakeries at issue produced goods for religious life cycle events like baptisms, bar mitzvahs, or first communions, defeating claims of anti-religious animus.

In Phillips’ case, on the other hand, the commission said the cake’s message could only be imputed to the customer, and ignored his willingness to sell generic baked good to all comers.

“In view of these factors, the record here demonstrates that the commission’s consideration of Phillips’ case was neither tolerant nor respectful of his religious beliefs,” the decision reads.

Kennedy also conceded Phillips could fairly assume his actions were lawful, since the events in question took place in 2012. At that time same-sex marriage was not legal in Colorado, and the high court had not handed down its landmark decisions in U.S. v. Windsor, which struck down the federal Defense of Marriage Act and Obergefell v. Hodges, which legalized gay marriage.

The ruling derives in part from the Supreme Court’s 1992 decision in Church of the Lukumi Babalu Aye v. City of Hialeah, in which the justices struck down a city ordinance forbidding animal sacrifice. The provision was adopted to curtail the practice of Santeria, a syncretic religion incorporating elements of Catholicism and west African paganism. The high court explained that Hialeah’s law was unconstitutional because it was gerrymandered to disfavor a particular religion.

The decision is silent as to whether a First Amendment objection can defeat a general and neutral public accommodations law, the legal question at the heart of the Masterpiece case. It merely reverses the decision of the Colorado Court of Appeals and sets aside the commission’s ruling against Phillips.

As such, the ruling is largely confined to the facts at hand, with limited application in related cases. Indeed, it is of limited utility to merchants seeking conscience-based exceptions to public accommodation requirements, as it leaves open the possibility that anti-discrimination agencies can persist in disfavoring religious dissenters, provided the animus is not detectable.

Mullins and Craig said the decision necessitates further action to vindicate LGBT rights.

“Today’s decision means our fight against discrimination and unfair treatment will continue,” they said in a statement via the American Civil Liberties Union. “We have always believed that in America, you should not be turned away from a business open to the public because of who you are. We brought this case because no one should have to face the shame, embarrassment, and humiliation of being told ‘we don’t serve your kind here’ that we faced, and we will continue fighting until no one does.”

For their part, Phillips’ lawyers trumpeted the holding as a victory for religious liberty.

“Tolerance and respect for good-faith differences of opinion are essential in a society like ours,” said Kristen Waggoner, senior counsel at the Alliance Defending Freedom. “This decision makes clear that the government must respect Jack’s beliefs about marriage.”

In a short and mild dissent, Ginsburg wrote that the statements commissioners made denigrating evangelical Christianity were not so potent that they infected the entire process.

“I see no reason why the comments of one or two commissioners should be taken to overcome Phillips’ refusal to sell a wedding cake to Craig and Mullins,” her dissent reads. “The proceedings involved several layers of independent decisionmaking, of which the commission was but one.”

Justice Elena Kagan wrote a concurring opinion joined by Justice Stephen Breyer arguing that Phillips had in fact violated Colorado’s anti-discrimination law. Though Kagan and Breyer joined the majority opinion in full, they emphasized that the commission and the Colorado courts could lawfully distinguish Phillips’ case from those of other bakers who declined requests for anti-gay cakes.

In their view, Phillips violated the law because he rebuffed a request from a gay couple that he would have accepted from a heterosexual couple. By contrast, the other bakers would refuse any customer requesting anti-gay products, regardless of their race, sexuality, or religion.

Still, they agreed that state officials and Colorado courts had unlawfully disparaged Phillips’ views, warranting his victory.

But Justice Neil Gorsuch disagreed with Kagan and Breyer, arguing in his own concurring opinion that the two classes of cases are not distinguishable, and any attempt to differentiate them would involve either an impermissible evaluation of private religious belief or ideological favoritism. Justice Samuel Alito joined Gorsuch’s concurrence.

Justice Clarence Thomas also filed a concurring opinion, which Gorsuch joined, arguing that Phillips should have prevailed on his First Amendment free speech argument. Phillips had asserted that the Colorado anti-discrimination law requires him to create expression with which he disagreed, in violation of the Constitution. Thomas warned that vindicating this position is essential to preserving religious liberty.

“Because the Court’s decision vindicates Phillips’ right to free exercise, it seems that religious liberty has lived to fight another day,” he wrote. “But, in future cases, the freedom of speech could be essential to preventing Obergefell from being used to ‘stamp out every vestige of dissent’ and ‘vilify Americans who are unwilling to assent to the new orthodoxy.'”

Follow Kevin on Twitter

Send tips to kevin@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.