A local court rejected an appeal from a Northern Ireland bakery on Monday to overturn a ruling that it had discriminated against a gay customer by refusing to bake a cake promoting support for same-sex marriage.

Ashers Baking Co., in Belfast, was found guilty of discrimination last May after the Northern Ireland Equality Commission brought a lawsuit against the bakery for refusing to bake a cake decorated with the words "Support Gay Marriage" and a picture of Sesame Street characters Bert and Ernie. Ashers argued that while it was happy to serve customers of any sexual orientation, baking such a cake would signify an endorsement of the message and therefore violate the owners' religious beliefs.

"The defendants are not a religious organisation," said district judge Isobel Brownlie last May explanation of the original ruling, as reported by The Guardian. "They conduct a business for profit. As much as I acknowledge their religious beliefs, this is a business to provide service to all. The law says they must do that."

The bakery lost in court for the second time on Monday, with the three-judge Court of Appeal's ruling that Ashers had indeed discriminated against the customer and violated British human rights law.

"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," said Lord Chief Justice Sir Declan Morgan in the ruling.

The controversy over the Bert and Ernie cake, which was first sparked in 2014 when the bakery accepted, then canceled, an order for the cake from gay rights activist Gareth Lee, comes at the same time as a growing push to legalize gay marriage in Northern Ireland, the only part of the United Kingdom where same sex marriage is not allowed. The practice was legalized in the Republic of Ireland last year after a referendum.

The largest political party in Northern Ireland, the socially conservative Democratic Unionist Party (DUP), defended the bakery's right to refuse to bake the cake. In contrast, a spokesman for Sinn Fein, the province's largest Irish nationalist party, called Monday's ruling a "victory for common sense and equality."

Equality commission director Michael Wardlow said the court's decision to uphold the 2015 ruling more clearly defines businesses' legal obligation not to refuse service to anyone.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

"If you're a person of faith and choose to trade in the commercial realm, the judge has said that you have a responsibility too," he told the Associated Press.

This report contains material from the Associated Press and Reuters.