The court ruling was hailed by the Alliance Defending Freedom (ADF), a conservative nonprofit organization that supported Phillips' appeal.
"Jack serves all customers; he simply declines to express messages or celebrate events that violate his deeply held beliefs," said ADF Senior Counsel Kristen Waggoner. "This decision makes clear that the government must respect Jack's beliefs about marriage."
The court ruling was drawn narrowly, however, and civil rights groups reacted to the decision with some relief.
"The Supreme Court acknowledged that LGBTQ people are equal and have a right to live free from the indignity of discrimination," said Chad Griffin, president of the Human Rights Campaign. "Anti-LGBTQ extremists did not win the sweeping 'license to discriminate' they have been hoping for."
The American Civil Liberties Union (ACLU) noted in a statement that the court's decision was based on "concerns unique in the case" and that it "reaffirmed its longstanding rule that states can prevent the harms of discrimination in the marketplace," in the words of ACLU Deputy Legal Director Louise Melling.
The unique issue in the Masterpiece Cakeshop v. Colorado Civil Rights Commission case concerned statements made by commissioners about Phillips' assertion of a right to freely exercise his religious faith in accordance with his beliefs.
Writing for the court majority, Justice Anthony Kennedy said some commissioners "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."
Such statements, Kennedy wrote, indicated "clear and impermissible hostility" toward his religious beliefs.
"For Justice Kennedy, that was a warning sign that free exercise of religion and claims of free exercise of religion are not being treated fairly," said Charles Haynes, founding director of the nonpartisan Religious Freedom Center in Washington, D.C. "I think he wanted to say, 'That cannot stand.'"
Kennedy had also argued that dissenting views on same sex marriage should be treated respectfully when he wrote the majority opinion in the court's 2015 Obergefell v. Hodges ruling, which legalized same-sex marriage in the United States.
The view that marriage is the union of a man and a woman, Kennedy wrote in that ruling, "has been held—and continues to be held—in good faith by reasonable and sincere people here and throughout the world."
In the Colorado case, Kennedy noted that other bakers in the state were not punished for refusing to make cakes with messages condemning homosexuality and same-sex marriage.
"The state can't play favorites," said ADF Senior Counsel Waggoner, speaking on a conference call with reporters. "I think that's what the court said loud and clear today. Because it did play favorites, because it expressed hostility towards [Phillips], that's why the case was reversed."
Unresolved in the Supreme Court decision was whether disputes over same-sex weddings and religious freedom objections might be seen differently if they were handled by civil rights commissions in a more neutral manner.
"There is no helpful national standard," says John Inazu, a professor of law at Washington University Law School who specializes in religious freedom claims. "The court's jurisprudence means that we're going to have state-by-state norms that vary quite a bit ... about what counts as protections for religious freedom."
Liberal states may be more inclined to protect the rights of same-sex couples, while conservative states may be inclined to limit those rights in the name of protecting religious freedom.