Christian bakers found to have breached equality laws by refusing to make a pro-gay marriage cake have lost their appeal case.
Court of Appeal judges in Belfast upheld an original judgment which ruled that Ashers Bakery had discriminated against a gay activist for declining his order for a cake bearing the slogan "Support Gay Marriage".
Northern Ireland remains the only part of the UK and Ireland which still prohibits same-sex civil marriage and LGBT advocates have been involved in a long campaign to demand a change in the law.
While Gareth Lee, whose order was cancelled, welcomed the Court of Appeal decision, Ashers general manager Daniel McArthur expressed his "extreme disappointment".
"If equality law means people can be punished for politely refusing to support other people's causes, then equality law needs to change," he said as he emerged from court surrounded by his family.
"This ruling undermines democratic freedom. It undermines religious freedom. It undermines free speech."
Mr McArthur said his family would consult their lawyers to see if there was any way to mount another legal challenge.
Mr Lee, whose order for the £36.50 cake was originally accepted but then later declined in a phone call, broke the public silence he has maintained throughout the long court proceedings to welcome the outcome.
"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 outside the Royal Courts of Justice in Belfast city centre.
Northern Ireland-based Ashers, a name with Biblical connotations, has six branches, employs more than 80 people and delivers across the UK and Ireland.
Mr Lee, a member of the LGBT advocacy group Queer Space, had wanted a cake featuring Sesame Street puppets Bert and Ernie for a private function marking International Day Against Homophobia.
He placed the order in person at Ashers' Belfast city centre branch in May 2014. It was accepted and he paid in full but, two days later, the company called to say it could not proceed with the cake due to the message requested.
In the original court case, District Judge Isobel Brownlie ruled that religious beliefs could not dictate the law and ordered the firm to pay damages of £500.
Mounting an appeal, Ashers contended that it never had an issue with Mr Lee's sexuality, rather the message he was seeking to put on the cake.
The business, owned and run by devout Christian family the McArthurs, contended the slogan was inconsistent with their deeply held religious beliefs.
The appeal was heard before three senior judges at Belfast's Court of Appeal in May, with the reserved judgment delivered on Monday morning.
In delivering their ruling, Northern Ireland's Lord Chief Justice, Sir Declan Morgan, said Ashers had directly discriminated.
He rejected the argument that the bakery would be endorsing the slogan by baking the cake.
"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.
Reading a 30-minute summary of the judgment to a packed courtroom, Sir Declan said the original ruling had been correct in finding that "as a matter of law" Ashers had "discriminated against the respondent directly on the grounds of sexual orientation contrary to the Equality Act (Sexual Orientation) Regulations 2006".
Mr Lee was embraced and shook hands with supporters after the judges left the court.
Members of the McArthur family sat impassively on the front bench of the public gallery as the rest of the court emptied.
Throughout the legal battle they have been supported by The Christian Institute, which has organised public rallies and garnered financial backing for the case.
Mr Lee's case was taken in conjunction with the publicly-funded Northern Ireland Equality Commission. It has spent £88,000 on the case to date and has asked that Ashers now foot that bill.
The judges did include some criticism of the commission in the appeal ruling.
They said the organisation should also have offered the McArthur family advice during the case, as the bakers believed their rights, as people of faith within the commercial sphere, were also being undermined.
After the judgment, Dr Michael Wardlow, from the commission, insisted it did represent the rights of all people in society, highlighting a recent case where it supported a man who did not want to work on Sundays due to his beliefs.