The UK’s highest court is to give its ruling on whether the Christian owners of a bakery discriminated against a customer by refusing to make a cake decorated with the words Support Gay Marriage.

Five Supreme Court justices will announce their decision in London on Wednesday.

Their ruling follows the latest round of a legal action brought against family-run Ashers bakery in Belfast by gay rights activist Gareth Lee, who won his case initially in the county court and then at the Northern Ireland Court of Appeal.

The bakery went on to fight the finding of discrimination at a Supreme Court hearing in Belfast in May.

During the Supreme Court proceedings, the panel of justices including president Lady Hale, were told that the owners were being forced to act against their religious beliefs.

Owners Daniel and Amy McArthur, who have said the law risked “extinguishing” their consciences, will be in London for the court’s judgment.

David Scoffield QC, for Ashers, argued that the state is penalising the baking firm, with the courts effectively compelling or forcing them to make a cake bearing a message with which they disagree as a matter of religious conscience.

The legal action against Ashers was taken by Mr Lee with support from Northern Ireland’s Equality Commission.

Gareth LeeGay rights activist Gareth Lee who brought a successful discrimination action against the Christian owners of a Belfast bakery (PA/Brian Lawless)

Mr Lee and Dr Michael Wardlow, the chief commissioner of the Equality Commission for Northern Ireland, are expected to be at the Supreme Court for the ruling.

Controversy first flared when Mr Lee, a member of the LGBT advocacy group QueerSpace, ordered a cake in 2014 featuring Sesame Street puppets Bert and Ernie for a private function marking International Day Against Homophobia.

His order was accepted and he paid in full but, two days later, the company called to say it could not proceed 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 unsuccessful challenge at the Court of Appeal in Belfast in 2016, Ashers contended that it never had an issue with Mr Lee’s sexuality, rather the message he was seeking to put on the cake.

Mr Scoffield told the justices that the case, a simple transaction, raised an issue of principle since those with deeply-held religious or philosophical convictions could be compelled to act against their beliefs.

Robin Allen QC, for Mr Lee, said: “This was a relatively small incident in his life which has become enormously significant and continues to be so. That is a heavy burden to bear for one individual.”

The legal battle has attracted enormous attention.

Northern Ireland is the only part of the UK or Ireland where same-sex marriage is outlawed, with Theresa May’s DUP allies staunch opponents of changing the law.

The Supreme Court will rule on whether Ashers “directly discriminated” against Mr Lee on grounds of sexual orientation contrary to the Equality Act (Sexual Orientation) Regulations (NI) 2006, and religious and political belief, contrary to the Fair Employment and treatment (NI) Order 1998, by refusing to make a cake decorated with the requested message.

The justices have also been asked to decide if the relevant provisions under the regulations and order breached the McArthur family’s rights under the European Convention on Human Rights relating to freedom to manifest one’s religious beliefs and freedom of expression.