The Christian owners of a Belfast bakery have lost their appeal against a court ruling that they discriminated against a homosexual customer in a case that sparked a national discussion on civil rights and religious freedom.

The owners of Ashers Baking, the McArthur family, refused to bake a cake featuring Sesame Street puppets Bert and Ernie with the phrase "Support Gay Marriage". Gareth Lee, a member of the LGBT advocacy group Queer Space, had ordered and paid for the cake for a private event marking International Day Against Homophobia.

The bakers later told him they could not fulfill the order due to their deeply-held religious belief conflicting with the cake message.

Northern Ireland's Lord Chief Justice Sir Declan Morgan said in the judgement on 24 October that the bakers had directly discriminated against the man, rejecting the argument that creating the cake would be endorsing the pro-gay marriage slogan.

"The fact that a baker provides a cake for a particular team or portrays witches on a Halloween cake does not indicate any support for either," he said.

In a brief statement to the press following the verdict, Lee expressed his satisfaction with the ruling: "The only thing that I would like to say is I'm relieved and very grateful to the Court of Appeal for the judgment," he said.

The McArthur family said the decision undermined their religious freedom and insisted that it was never about the customer, but about the message.

Bert and Ernie
Ashers Baking Co was found guilty of discrimination after refusing to bake a Bert and Ernie cake supporting gay marriage

District Judge Isobel Brownlie ruled in 2015 that religious beliefs could not dictate the law and ordered the firm to pay damages of £500 to Lee, who had claimed the episode made him feel like a lesser person.

Lee's case was taken in conjunction with the Northern Ireland Equality Commission. The bakers were supported by The Christian Institute, which organised public rallies and financial backing for the case and also several DUP politicians.

Following a referendum in the Republic of Northern Ireland legalising gay marriage in June 2015, up to 20,000 people participated in a rally through Belfast city centre demanding a lift to the ban on same-sex marriages. Northern Ireland is the only country in the British Isles enforcing the ban.