A Northern Irish gay activist who attempted to order a cake with a pro-gay marriage slogan has lost a seven-year legal battle after the European Court of Human Rights ruled his case as "inadmissible". 

Gareth Lee took legal action against Ashers bakery in 2014 after the Christian-run Belfast bakery refused to make a cake with a slogan stating "support gay marriage". 

The Ashers family stated that the slogan went against their Christian beliefs, prompting Lee to sue on the basis that he had been discriminated against on the grounds of his sexual orientation and political beliefs. 

He won his original case and a subsequent appeal in the UK courts, but the UK Supreme Court ruled against him and found in favor of the bakery in 2018. 

The ruling prompted Lee to take his case to the European Court of Human Rights (ECHR), where it would be examined by a panel of seven judges. 

The seven-judge panel ruled by majority on Thursday that Lee's case was inadmissible because he had not invoked his rights under the European Convention of Human Rights "at any point" during the domestic proceedings in the UK courts. 

The judges argued that "the Convention arguments must be raised explicitly or in substance before the domestic authorities" in order for a complaint to be admissible in the ECHR. 

"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," the ruling stated. 

"Because he had failed to exhaust domestic remedies, the application was inadmissible." 

Lee said that he was disappointed by the ruling, which failed to address the "core issues" of the case "because of a technicality". 

"None of us should be expected to have to figure out the beliefs of a company's owners before going into their shop or paying for their services," Lee said in a statement. 

"I am grateful to my legal team and to everyone who, over many years, has given me help and support. I believe we all want to live in an open, fair and tolerant society.

"This case has put a spotlight on the challenges faced by LGBT+ in Northern Ireland. I will continue to support all law that protects and gives rights to all people equally." 

Lee is a member of the LGBT advocacy group QueerSpace and attempted to order a cake with Sesame Street characters Bert and Ernie along with the slogan "Support Gay Marriage" for a private function celebrating International Day Against Homophobia in May 2014. 

Ashers bakery refused to make the cake, stating that it objected to the cake's message, not the customer.