A Christian bakery was found guilty of discrimination on the grounds of sexual orientation, a court has ruled in a landmark case.

The Ashers Baking Company in County Antrim, Northern Ireland, cancelled an order for the cake showing the popular Sesame Street characters arm in arm with the slogan "Support Gay Marriage", because it contravened its religious convictions.

The Equality Commission sought legal action at the District Judges Court in Belfast against the firm on behalf of customer Gareth Lee, a gay activist, for allegedly breaching statutory duty not to discriminate on the grounds of sexual orientation in the provision of goods or services.

Lee said he felt "like a lesser person" when the bakery refused his order.

"I wasn't worthy of service because they were Christian. That was the message that struck me. It made me feel not worthy, like I'm a lesser person and to me that is wrong," he said.

Ashers general manager Daniel McArthur said it was not the first time the company has refused customer orders which went against their beliefs, including those which contained pornographic images and foul language.

"If we don't stand up against this case how can we stand up further down the line?" he said.

A Belfast judge accepted their deeply held religious beliefs but said Ashers was a "business for profit" and was not exempt from discrimination law.

Today's ruling (19 May) is a landmark decision at Belfast County Court and comes just three days before the Republic of Ireland holds a referendum on same-sex marriage.

Northern Ireland is the only part of the UK where gay marriage is illegal.

Northern Ireland Deputy First Minister Martin McGuinness tweeted: "Asher's bakery judgement a good result for equality. Gay people have for far too long been discriminated against. We and the law on their side."

But DUP assembly member David McIlveen wrote: "Utterly sickened that a Christian owned business has been hauled over the coals for refusing to promote something that is not legal in NI."

Defence lawyer Aidan O'Neill QC, who was commissioned by the Christian Institute that supported the bakery, said if the case was upheld "it could undermine freedom of conscience".

Sky News senior correspondent Michelle Clifford said: "A cake that was supposed to cost £36.50 has ended up costing tens of thousands of pounds in legal fees."

She said the bakery expected to face a maximum fine of £500 ($776).