A Colorado state government commission violated the First Amendment religious freedom of an evangelical Christian baker who refused to bake a wedding cake for a same-sex couple, the Supreme Court ruled Monday.

The 7-2 decision in the most closely watched religious liberty case of the term held that the Colorado Civil Rights Commission (CCRC) violated the free exercise clause of the First Amendment in punishing Masterpiece Cakeshop and its owner, Jack Phillips (pictured above).

Justice Anthony Kennedy, writing for the majority, noted that Masterpiece Cakeshop argued the case on both free speech and freedom of religion grounds.

“Whatever the confluence of speech and free exercise principles might be in some cases, the Colorado Civil Rights Commission’s consideration of this case was inconsistent with the State’s obligation of religious neutrality,” he wrote. “The reason and motive for the baker’s refusal were based on his sincere religious beliefs and convictions.”

In addition to the court’s other four conservative justices, liberal-leaning Justices Stephen Breyer and Elena Kagan also joined the majority opinion.

In a concurring opinion, Kagan emphasized that this decision was based on the Civil Rights Commission’s failure to act as a neutral fact-finder. She wrote that Colorado law can protect the right of gay people to buy whatever products and services they choose on the same basis as heterosexual customers.

“For that reason, Colorado can treat a baker who discriminates based on sexual orientation differently from a baker who does not discriminate on that or any other prohibited ground,” she wrote. “But only, as the Court rightly says, if the State’s decisions are not infected by religious hostility or bias.”

“Jack serves all customers; he simply declines to express messages or celebrate events that violate his deeply held beliefs,” said Alliance Defending Freedom Senior Counsel Kristen Waggoner, who argued before the high court on behalf of Phillips and Masterpiece Cakeshop. “Creative professionals who serve all people should be free to create art consistent with their convictions without the threat of government punishment.”

Related: Three Most Important First Amendment Cases of 2018

“Government hostility toward people of faith has no place in our society, yet the state of Colorado was openly antagonistic toward Jack’s religious beliefs about marriage,” Waggoner added. “The court was right to condemn that. Tolerance and respect for good faith differences of opinion are essential in a society like ours. This decision makes clear that the government must respect Jack’s beliefs about marriage.”

Who do you think would win the Presidency?

By completing the poll, you agree to receive emails from LifeZette, occasional offers from our partners and that you've read and agree to our privacy policy and legal statement.

Phillips maintained that he sold products off the shelf to gay customers but that his deeply held religious beliefs prevented him from recognizing same-sex marriage by producing a custom cake for a gay wedding.

Related: California Baker Does Not Have to Make Same-Sex Wedding Cakes

Justices Ruth Bader Ginsburg, who wrote the dissent for herself, and Justice Sonia Sotomayor rejected the argument that the case was about Phillips’ religious freedom not to recognize gay marriage.

Ginsburg found it “irrelevant” that he sold products off the shelf to gay customers. She also rejected the majority opinion’s reliance on the commission’s finding in favor of other bakers who has refused to make cakes with messages they found offensive.

The key difference, Ginsburg wrote, is that the bakers in those cases turned down a request to add a special message to the cake that they would not have done for any customer.

“What matters is that Phillips would not provide a good or service to a same-sex couple that he would provide to a heterosexual couple,” Ginsburg wrote. “In contrast, the other bakeries’ sale of other goods to Christian customers was relevant: It shows that there were no goods the bakeries would sell to a non-Christian customer that they would refuse to sell to a Christian customer.”

“The decision is a strong message to governments across the country that they must respect — rather than punish — religious diversity on important issues.”

Mark Rienzi, president of the Becket Fund for Religious Liberty, praised the ruling.

“The Court has said 7-2 that the Constitution requires us all to try and get along,” he said in a statement. “There is room enough in our society for a diversity of viewpoints, and that includes respecting religious beliefs, too. The decision is a strong message to governments across the country that they must respect — rather than punish — religious diversity on important issues.”

PoliZette senior writer Brendan Kirby can be reached at [email protected]. Follow him on Twitter.