LONDON (Reuters) - Britain’s highest court on Wednesday said a Northern Irish bakery’s refusal to make a cake bearing a pro-gay slogan was not discriminatory in a ruling condemned by the customer, a gay rights activist, but hailed by the province’s main conservative party.

Slideshow ( 5 images )

Ashers Baking in Belfast was found guilty of discrimination in 2015 for refusing to make a cake for a customer iced with the words “Support Gay Marriage” because of the owners’ Christian beliefs.

It failed in an appeal to the local courts in 2016 but the Supreme Court, the UK’s highest judicial body, overturned that decision on Wednesday, saying the bakers’ objection was to the message on the cake, not to any personal characteristics of the messenger, or anyone with whom he was associated.

“The objection was to being required to promote the message on the cake,” said Brenda Hale, President of the Supreme Court, adding that the conclusion would not in any way diminish the need to protect gay people and people who support gay marriage.

“The less favourable treatment was afforded to the message not to the man. It was not as if he were being refused a job, or accommodation, or baked goods in general, because of his political opinion. The evidence was that they were quite prepared to serve him in other ways.”

The court said the situation was more akin to a Christian printing business being required to print leaflets promoting an atheist message.

Gareth Lee, a gay rights activist who had ordered the cake, said in reaction to Wednesday’s ruling that he was a “a second class citizen” in Northern Ireland, the only part of the United Kingdom where same-sex marriage is not allowed.

“In Northern Ireland, I’m a second class citizen and that’s unfortunate. We don’t have the same rights in Northern Ireland as gay people as we do in the rest of the United Kingdom,” he said.

The province’s Equality Commission, which backed Lee’s case, said it was disappointed with the judgment and the implications that the beliefs of business owners may take precedence over a customer’s equality rights.

But the ruling was hailed by the socially conservative Democratic Unionist Party (DUP), the province’s largest party that props up Britain’s minority government and has blocked attempts to legalize gay marriage in the province.

“The Ashers ruling is an historic and seminal judgment. This now provides clarity for people of all faiths and none,” DUP leader Arlene Foster said on Twitter.

Daniel McArthur, who owns the bakery with his wife Amy, said the ruling protected freedom of speech and freedom of conscience for everyone.

“We always knew we hadn’t done anything wrong in turning down this order,” he told reporters outside the court.