The US supreme court on Monday ruled in favor of a Colorado baker who refused to make a wedding cake for a gay couple for religious reasons, although the justices avoided a wider ruling on religious exemptions for businesses.

Charlie Craig and David Mullins went to the Masterpiece Cakeshop in Lakewood, Colorado, in July 2012, only for owner Jack Phillips to say he would not provide a cake for a same-sex couple. The two men complained to the Colorado Civil Rights Commission (CCRC), which decided against Phillips.

The case went all the way to the supreme court and on Monday it ruled 7-2 that the commission violated Phillips’ rights under the first amendment, which guarantees freedom of expression. The court did not address the wider principle of whether a business can refuse to serve gay people, saying this “must await further elaboration”.

Writing for the majority, justice Anthony Kennedy said the CCRC showed “hostility” to Phillips’ religious beliefs in ordering him to undergo anti-discrimination training.



“The laws and the constitution can, and in some instances must, protect gay persons and gay couples in the exercise of their civil rights,” Kennedy wrote, “but religious and philosophical objections to gay marriage are protected views and in some instances protected forms of expression.”



The decision focused narrowly on the handling of Phillips’ case, however, leaving open the question of whether anti-discrimination laws should supersede religious beliefs in future cases.



“The court’s precedents make clear that the baker, in his capacity as the owner of a business serving the public, might have his right to the free exercise of religion limited by generally applicable laws,” Kennedy wrote.

“Still, the delicate question of when the free exercise of his religion must yield to an otherwise valid exercise of state power needed to be determined in an adjudication in which religious hostility on the part of the state itself would not be a factor in the balance the state sought to reach. That requirement, however, was not met here.”

Ruth Bader Ginsburg and Sonia Sotomayor dissented. The two most liberal justices said they would have upheld the finding of the commission, which decided that Phillips violated the Colorado anti-discrimination law that bars businesses from refusing service based on race, sex, marital status or sexual orientation.

Mullins spoke to reporters on a conference call. “I just hope that people can understand that this is not a wide-ranging ruling,” he said, “and that this doesn’t mean that … the Colorado Anti-Discrimination Act has been invalidated in any way. We will continue fighting until no one has to endure the shame, embarrassment and humiliation of being told, ‘We don’t serve your kind here.’”

Of Colorado, he said: “The state we call home has had our back every step of the way.”

Speaking to the Guardian, Craig said: “We’ve been going through this for our entire marriage – it’s been six years – and if I could have a time traveling machine and go back in time and do it all over again, we absolutely would.”

Appeals in similar cases are pending, including one at the supreme court from a florist who did not want to provide flowers for a same-sex wedding. Since the Masterpiece incident, same-sex marriage has become legal across the US.

Craig said: “I feel like we’ve won in a sense because we’ve started a nationwide dialogue. We never thought our case would make it to the supreme court so we hope that more people are able to make it there and a different ruling happens. We don’t see our case as the end of this process.”

Jack Phillips at Masterpiece Cakeshop in Lakewood, Colorado. Photograph: Eric Baradat/AFP/Getty Images

Donald Trump Jr, the president’s son, mocked media coverage that described the decision as narrow. He tweeted: “I am reading about a 7-2 vote. Pretty sure that’s not narrowly … At least 2 dem leaning justices must have agreed.” Critics on Twitter quickly pointed out that it was the scope of the legal decision that was “narrow”, not the vote among the justices.

The attorney general, Jeff Sessions, said: “The first amendment prohibits governments from discriminating against citizens on the basis of religious beliefs. The supreme court rightly concluded that the Colorado Civil Rights Commission failed to show tolerance and respect for Mr Phillips’ religious beliefs.”

The American Principles Project, a conservative thinktank, welcomed the decision. Its executive director, Terry Schilling, said: “Today’s emphatic 7-2 ruling is a tremendous victory for Jack Phillips and all Americans who desire to follow their faith and conscience. It also serves as a condemnation of the institutional anti-Christian bigotry that has grown rampant over the past decade.”

Among liberal groups, the Human Rights Campaign, America’s biggest LGBT civil rights organization, noted the limited frame of reference of the ruling. Chad Griffin, its president, said: “In today’s narrow ruling … the supreme court acknowledged that LGBT people are equal and have a right to live free from the indignity of discrimination. Anti-LGBT extremists did not win the sweeping ‘license to discriminate’ they have been hoping for.”

Tom Perez, chair of the Democratic National Committee, said: “This case was never just about a wedding cake. It was about all people – no matter who they are – having the right to celebrate their love without facing discrimination. The Democratic party believes that no individual has a license to discriminate. We believe in the dignity of every human being.”