A human rights lawyer has claimed that a potential ruling that would force a Christian bakery to bake a same-sex marriage cake could set a sweeping precedent - that could see a Muslim printer ordered to print images of the Prophet Mohamed or an atheist web designer forced to create a website about God.

Aidan O’Neill QC said legal action against Ashers Baking Co, a Christian-run bakery in Newtownabbey, Northern Ireland, could have far-reaching implications for "negative freedom of expression", The Telegraph reported.

Last year the bakery refused a gay rights activist's request to produce a cake featuring a picture of the Sesame Street characters Bert and Ernie alongside the slogan: "Support Gay Marriage."

General manager Daniel McArthur insisted that baking the cake would amount to endorsing the campaign for the introduction of gay marriage in the province, and go against his religious convictions. Unlike the British mainland, gay marriage is not legal in Northern Ireland.

However, the Equality Commission for Northern Ireland wrote to the firm insisting that they were in breach of the law. It claimed that refusing to print the cake amounted to discrimination on grounds of sexual orientation against the man who placed the order.

A letter signed by the legal office ordered the firm to remedy "illegal discrimination" within seven days or be taken to court by the commission.

In pictures: UK's first gay weddings Show all 16 1 /16 In pictures: UK's first gay weddings In pictures: UK's first gay weddings First gay marriages Lesbian couple Sarah Keith (left) and Emma Powell embrace while posing for photographs after their same-sex wedding at the Claremont Hotel in Brighton Reuters In pictures: UK's first gay weddings First gay marriages Sean Adl-Tabatabai, center, and Sinclair Treadway, right, pose for photographers with the openly gay mayor of Camden Jonathan Simpson, left, after they were announced officially married in a wedding ceremony in the Council Chamber at Camden Town Hall in London, Saturday 29 March, 2014 AP In pictures: UK's first gay weddings First gay marriages Helen Brearley (right) and Teresa Millward pose for photographs after getting married at Halifax Register Office Getty Images In pictures: UK's first gay weddings First gay marriages Gay couple Neil Allard (right) and Andrew Wale are married in the Music Room of Brighton's Royal Pavilion shortly after midnight in one of the UK's first same-sex weddings Getty Images In pictures: UK's first gay weddings First gay marriages Sean Adl-Tabatabai, third from left, and Sinclair Treadway, fourth from left, pose for photographs with, from left, the openly gay mayor of Camden Jonathan Simpson, deputy superintendent registrar Steven Lord and registrar officer Tania Uddin AP In pictures: UK's first gay weddings First gay marriages A woman waves a rainbow flag as gay couple Peter McGraith and David Cabreza leave Islington Town Hall Getty Images In pictures: UK's first gay weddings First gay marriages A solitary demonstrator holds a placard in protest against the legalisation of same sex marriage, outside St Margaret's Church, Westminster Abbey, London PA In pictures: UK's first gay weddings First gay marriages Sean Adl-Tabatabai and Sinclair Treadway look jovial as they tie the knot in front of around 100 guests AP In pictures: UK's first gay weddings First gay marriages The rainbow flag flies above British Cabinet Offices, marking the first day Britain has allowed same sex marriages, in London Reuters In pictures: UK's first gay weddings First gay marriages Lesbian couple Sarah Keith and Emma Powell (left) react after their same-sex wedding at the Claremont Hotel in Brighton Reuters In pictures: UK's first gay weddings First gay marriages A pair of shoes are pictured on a chair at a place setting during the reception after the same-sex wedding of couple Sarah Keith and Emma Powell in Brighton Reuters In pictures: UK's first gay weddings First gay marriages Camden mayor Jonathan Simpson speaks during the ceremony, which took place just after midnight on Saturday AP In pictures: UK's first gay weddings First gay marriages Sean Adl-Tabatabai looks on as his new husband Sinclair Treadway signs official documents AP In pictures: UK's first gay weddings First gay marriages Sean Adl-Tabatabai and Sinclair Treadway hold hands as they celebrate their marriage AP In pictures: UK's first gay weddings First gay marriages Sean Adl-Tabatabai and Sinclair Treadway toast married life AP In pictures: UK's first gay weddings First gay marriages Sealed with a kiss: Sean Adl-Tabatabai and Sinclair Treadway make it official AP

The Christian institute, which is supporting the bakery, said it was not discriminatory for Mr McArthur to refuse to endorse a political campaign.

And Mr O'Neill, who is supported by the Christian Institute, said that he did not consider the Equality Commission's case to be "correctly based in law" because it suggested that "the law does not protect the fundamental right, within the commercial context of supplying services, to hold opinions nor guarantee any negative freedom of expression".

He added that if the case was upheld "there would be no defence to similar actions being taken against individuals or companies supplying services in any of the following scenarios which have been presented to me".

These included the Muslim printer and atheist web designer examples.