A Belfast bakery's refusal to bake a cake bearing a pro-gay slogan was not discriminatory, the UK's highest court ruled on Wednesday.

Ashers Bakery was found guillty of discrimination in 2015 after refusing the previous year to make a cake with the words 'Support Gay Marriage' on it, having explained they couldn't do so because of their Christian beliefs.

Following a failed appeal in 2016, the case went to the UK's Supreme Court which has now overturned the decision in a unanimous ruling, saying that while 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 or any of the other protected personal characteristics...that is not what happened in this case".

Lady Hale, the court's president, said the bakers' objection was to the "message, not the messenger".

"The objection was to being required to promote the message on the cake. The less favourable treatment was afforded to the message not to the man."

She said the situation was "not comparable to people being refused jobs, accommodation or business simply because of their religious faith". "It is more akin to a Christian printing business being required to print leaflets promoting an atheist message."

Outside court, Daniel McArthur, the general manager of the family-run Ashers Bakery reportedly thanked God, saying He had "been with us for the last four years".

"We are delighted with the ruling," he said. "We always knew we had done nothing wrong in turning down the order. We are very grateful to the judges."

“We did not turn down this order because of the person who made it, but because of the message itself.”

Meanwhile the customer who brought the case, Gareth Lee, reportedly said it had made him feel like a second-class citizen in Northern Ireland and he was concerned about the implications of the decision.

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

Michael Wardlow, the head of the Equality Commission for Northern Ireland - which had supported the case and will now have to pay costs, expressed disappointment with the ruling and added that it left a "lack of clarity" about equality law.