The highest court in the United Kingdom has ruled that a Christian bakery’s refusal to make a cake supporting same-sex marriage does not constitute discrimination.

In a unanimous decision Wednesday, the U.K. Supreme Court said the Northern Ireland-based family bakery, Ashers Baking Co., did not discriminate against a gay customer in 2014 by declining to make the cake.

The cake’s icing was to include the “Sesame Street” characters Bert and Ernie and the slogan “Support Gay Marriage,” according to a report by the BBC.

Daniel and Amy McArthur, the married owners of the Belfast bakery, argued in court that they could not produce products with messages that go against their Christian faith.

Gareth Lee, the customer, sued the bakery on the grounds that its owners discriminated against him based on his sexual orientation and political beliefs.

Lee is a gay rights activist and campaigner.

The Equality Commission for Northern Ireland, a public body established by law in Northern Ireland, supported Lee both legally and financially throughout the case. The commission offers “protection against discrimination on the grounds of age, disability, race, religion and political opinion, sex, and sexual orientation.”

Lee had ordered the cake for a civic event in another city to mark the International Day Against Homophobia and Transphobia, the BBC reported. Another bakery made the cake.

Brenda Hale, president of the court, said in the ruling that “it is deeply humiliating, and an affront to human dignity, to deny someone a service because of that person’s race, gender, disability, sexual orientation, religion or belief.”

“But that is not what happened in this case,” Hale said, speaking for a unanimous five-member panel of the 12-member high court.

“They would have refused to make such a cake for any customer, irrespective of their sexual orientation,” she said of the McArthurs.

What has been dubbed the “gay cake” case made its way to the U.K. Supreme Court after lower courts found the bakers to have discriminated against Lee. This was the first case from Northern Ireland that the Supreme Court has heard, according to CBS News.

So far the case has cost the bakery around 200,000 pounds (about $264,000). The Christian Institute, a charity and lobbying group, is paying the bakery’s legal expenses.

“I know a lot of people will be glad to hear this ruling today, because this ruling protects freedom of speech and freedom of conscience for everyone,” Daniel McArthur told BBC News.

McArthur has said his bakery took issue with the requested slogan and not Lee’s sexual orientation or political beliefs.

“We didn’t say no because of the customer; we’d served him before, we’d serve him again,” McArthur told the BCC in June at the start of the Supreme Court case.

Alliance Defending Freedom, a Christian legal aid organization that litigates religious liberty cases and has an international affiliate, approved of the court’s ruling.

“The U.K. Supreme Court recognized that artists and other professionals don’t discriminate when they object ‘to the message, not the messenger,’” Kristen Waggoner, senior vice president and head of the organization’s U.S. legal division, said in a press release provided to The Daily Signal.

“The court also affirmed the fundamental freedom of Ashers Bakery’s owners to decline to express through one of their cakes ‘a message with which they deeply disagreed,’” Waggoner said.

The case in Northern Ireland has some similarities to the case of Colorado “cake artist” Jack Phillips, which Waggoner argued and won before the U.S. Supreme Court.

Lee, however, said the case had nothing to do with freedom of speech or conscience, and that the ruling made him feel like a second-class citizen.

“To me, this was never about conscience or a statement. All I wanted to do was to order a cake in a shop,” he said.

“Too many people seem to think that every disagreement is discrimination,” Ryan T. Anderson, a senior research fellow at The Heritage Foundation and author of the book “Truth Overruled: The Future of Marriage and Religious Freedom,” told The Daily Signal in an email.

“Thankfully the court correctly noted that the objection in this case was to the message, not the customer,” Anderson said, adding:

We live in societies where citizens disagree about the nature and purpose of marriage. No one should be punished simply because they believe and act on the belief that marriage unites husband and wife. That’s the only way to protect pluralism—to peacefully coexist—in the midst of disagreement.

Hale, for her part, said the ruling was not intended to diminish the need for protecting gays and lesbians and those who support same-sex marriage.

This report has been modified to clarify that the unanimous ruling was from five members of the 12-member court.