Same-sex marriage will remain illegal in Northern Ireland, after a High Court judge in Belfast dismissed two cases challenging the law.

Northern Ireland is the only jurisdiction in the United Kingdom which bans gay marriage, despite the fact they were the first part of the UK to pass a law allowing civil partnerships in 2004.

The two couples involved in the case – Grainne Close and Shannon Sickles, and Chris Flanagan-Kane and Henry Flanagan-Kane – were the first couples in the United Kingdom to enter into a civil partnership when they were registered at Belfast city hall on December 19, 2005.

Flanagan and Kane were married in England – where same-sex marriage has been legal since March 2014 (It became legal in Scotland in December 2014) – and were seeking to have their marriage recognized as such in Northern Ireland, where it is legally treated as a civil partnership.

The lawyers in the case contended the ban breached Article Eight of the European Convention on Human Rights, by denying respect for their private and family lives.

“It is not at all difficult to understand how gay men and lesbians who have suffered discrimination, rejection and exclusion feel so strongly about the maintenance in Northern Ireland of the barrier to same sex marriage,” Justice John O’Hara said.

“However, the judgment which I have to reach is not based on social policy, but on the law,” he said.

O’Hara said the European Court of Human Rights has never recognized any right to same-sex marriage.

“It’s not the role of a judge to decide social policy, that is for the Executive and the Assembly under our constitution,” he said, referring to the government structures of Northern Ireland.

Currently, fifteen European countries have legalized same-sex marriage: Belgium, Denmark, Finland, France, Germany, Iceland, Ireland, Luxembourg, Malta, Netherlands, Norway, Portugal, Spain, Sweden and the United Kingdom (except for Northern Ireland).

The law allowing same-sex marriage in Malta, traditionally seen as a conservative Catholic country, was just signed on August 1.

Northern Ireland’s laws are often more in line with traditional values than the rest of the country, due to the predominance of religiously-affiliated parties. Abortion, for example, is mostly illegal in the province, even though the rest of the UK has some of the most liberal abortion laws in Europe.

However, on the same-sex marriage, both of the traditionally Catholic parties – Sinn Fein, long associated with the Irish Republican Army (IRA), and the moderate SDLP – support ending the ban. However, the two parties representing the Protestant majority – the Democratic Unionist Party (DUP) and Ulster Unionist Party (UUP) – both back defining marriage as exclusively between a man and a woman.

The Republic of Ireland’s legalization of same-sex marriage came after 62 percent of the predominantly Catholic population voted to change the constitution to allow same-sex marriage in 2015.

Ireland is currently planning on holding a referendum to liberalize the country’s pro-life abortion laws in 2018 – the same year Pope Francis is expected to visit Dublin for the World Meeting of Families.