The United Kingdom’s highest court on Wednesday ruled that a bakery’s refusal to make a cake with a slogan supporting same-sex marriage was not discriminatory, reported Reuters. The five Supreme Court justices hearing the case passed a unanimous judgement.

Gay rights activist Gareth Lee in 2014 ordered a cake to be baked with the slogan “Support Gay Marriage” inscribed on the frosting. But Ashers Baking in Northern Ireland’s Belfast refused to bake it, citing the slogan as inconsistent with the owner’s religious beliefs.

Lee then sued the bakery for discrimination on the grounds of sexual orientation and political beliefs, reported the BBC.

The owners, Daniel McArthur and his wife Amy, were found guilty of discrimination and their appeal in a local court failed in 2016.

But the Supreme Court overturned the verdict, observing that the bakery’s owners objected to the message on the cake’s icing and not to any personal characteristics of the messenger or anyone with whom he was associated. The bakery would have refused to make such a cake for anyone irrespective of their sexual orientation, the court observed. “Their objection was to the message on the cake, not to the personal characteristics of Mr Lee,” the judges added.

“This conclusion is not in any way to diminish the need to protect gay people and people who support gay marriage,” said Supreme Court President Brenda Hale. “It is deeply humiliating and an affront to human dignity to deny someone the service because of that person’s race, gender, sexual orientation, religion or belief but that is not what happened in this case.”

McArthur said the verdict protects freedom of speech and freedom of conscience for everyone. “We always knew we hadn’t done anything wrong in turning down this order,” he added.

The socially conservative Democratic Unionist Party, the largest party in Northern Ireland, applauded the judgement. “The Ashers ruling is an historic and seminal judgment,” said party leader Arlene Foster. “This now provides clarity for people of all faiths and none.”

However, a disappointed Lee described himself as a “second class citizen” in the aftermath of the verdict. “We do not have the same rights in Northern Ireland as gay people as we do in the rest of the United Kingdom,” he said.

Northern Ireland is the only part of the country where same-sex marriage is not allowed. “To me, this was never about conscience or a statement,” Lee said. “All I wanted to do was to order a cake in a shop.”

The Equality Commission for Northern Ireland, which supported Lee’s case, expressed its disappointment. “There is a concern that this judgement may raise uncertainty about the application of equality law in the commercial sphere, both about what businesses can do and what customers may expect,” said Chief Commissioner Michael Wardlow.