A Christian-run bakery in Northern Ireland will face prosecution for "unlawful discrimination" after refusing to make a make a cake with a picture of Sesame Street puppets Bert and Ernie endorsing gay marriage.

The controversy surrounding the cake began when local gay rights organisation, QueerSpace, ordered the cake at the Ashers Baking Company in Belfast in May.

The bakery, based in Newtownabbey, refused to make the cake on the grounds gay marriage goes against the religious beliefs of the firm's directors.

The Bert and Ernie cake was ordered for a former mayor, to tie in with an event on the International Day Against Homophobia and Transphobia.

The Equality Commission for Northern Ireland said that it would be taking legal action and has written to the solicitors acting on behalf of the bakery and setting out the grounds on which unlawful discrimination is alleged.

"This case raises issues of public importance regarding the extent to which suppliers of goods and services can refuse service on grounds of sexual orientation, religious belief and political opinion," a spokesperson added.

General manager of the family-run bakery, Daniel McArthur, said his family should not be forced to accept something which goes against their views.

He added: "We feel that the Equality Commission are pursuing us because of our beliefs that marriage is between a man and a woman.

"It feels like a David and Goliath battle because on one hand we have the Equality Commission who are a public body, they're funded by taxpayers' money, they have massive resources at their disposal whereas we are a small family business and we have limited resources at our disposal.

"We don't want to be forced to promote a cause which is against our biblical beliefs. We've had a lot of support from people who disagree with our stance on same-sex marriage. They think that we should have the freedom to decline an order that conflicts with our conscience."

Northern Ireland is the only part of the UK that still prohibits gay marriage.