Image caption, The cake was ordered from a Christian-run Belfast bakery by gay rights activist Gareth Lee
The European Court of Human Rights has dismissed a legal challenge in a long-running dispute known as the "gay cake" case, ruling the action inadmissible.
The judges said applicant Gareth Lee "failed to exhaust domestic remedies" available to him in the UK courts.
Mr Lee sued a Northern Ireland bakery for refusing to make a cake decorated with the slogan "Support Gay Marriage".
Ashers Bakery, a Christian-run firm, refused the order, saying the slogan contravened their religious beliefs.
Mr Lee, from Belfast, alleged that by refusing to fulfil the order, the bakery had discriminated against him on grounds of his sexual orientation and political beliefs.
- 'Gay cake' row: Q&A
- Gay cake row referred to European Court
He won his original case and a subsequent appeal in the UK courts, but in 2018 the UK Supreme Court disagreed with the lower courts' decisions and found in favour of the bakery.
Mr Lee then took his case to the European Court of Human Rights.
On Thursday it ruled his case was inadmissible because he had not invoked his rights under the European Convention of Human Rights "at any point in the domestic proceedings" in the UK courts.
The judges decided that in order for a complaint to be admissible, "the Convention arguments must be raised explicitly or in substance before the domestic authorities".
"The applicant had not invoked his Convention rights at any point in the domestic proceedings," the ruling stated.
"By relying solely on domestic law, the applicant had deprived the domestic courts of the opportunity to address any Convention issues raised, instead asking the Court to usurp the role of the domestic courts.
"Because he had failed to exhaust domestic remedies, the application was inadmissible," it added.
The case was examined by seven judges who decided, by majority, that the case should be dismissed as inadmissible.
Gay cake row referred to European Court
Published15 August 2019
Q&A: What is the 'gay cake' row about?
Published26 minutes ago