London (CNN)Christian bakers in Northern Ireland who refused to make a cake decorated with the words "Support Gay Marriage" on Wednesday won their appeal in the UK's highest court.
The McArthur family, owners of the Ashers bakery in Belfast, won their Supreme Court appeal against a 2015 ruling that found they had sexually discriminated against customer and gay rights activist Gareth Lee.
Lee had requested a cake featuring the Sesame Street characters Bert and Ernie and a message in favor of same-sex marriage.
But the bakery refused to make the cake because the owners said the message conflicted with their Christian beliefs.
The bakery owners appealed the county court decision in Northern Ireland's Court of Appeal in 2016, but the decision was upheld.
They then took their challenge to London's Supreme Court, where on Wednesday it was unanimously allowed by five Supreme Court justices.
Announcing the court's decision, its president, Lady Hale, said, "The bakers did not refuse to fulfill his order because of his sexual orientation," the Press Associated reported.
"They would have refused to make such a cake for any customer, irrespective of their sexual orientation."
She added: "The bakers could not refuse to supply their goods to Mr Lee because he was a gay man or supported gay marriage, but that is quite different from obliging them to supply a cake iced with a message with which they profoundly disagreed."
Lee, who is a member of the advocacy group QueerSpace, had ordered the cake in 2014 for a private function celebrating International Day Against Homophobia.
Lee's lawyer, Robin Allen, said on Wednesday, "This was a relatively small incident in his life which has become enormously significant and continues to be so," PA reported. "That is a heavy burden to bear for one individual."
Same-sex marriage is illegal in Northern Ireland, as opposed to the rest of the UK where it became legal in 2014.