Two landmark court challenges against the ban on same-sex marriage in Northern Ireland have been dismissed by the country’s High Court.

Delivering his judgement Mr Justice O’Hara rejected both cases, insisting the ban did not violate the rights of LGBT couples in the region, adding it was for the Stormont Assembly to judge to decide social policy in Northern Ireland.

While same-sex marriage is now legal in the Irish Republic, England, Scotland and Wales, gay couples are still banned from marrying in Northern Ireland where it remains a divisive issue.

“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,” Mr O’Hara said as he delivered his verdict in Belfast.

But, he added: “The judgement which I have to reach is not based on social policy but on the law.”

Members of the Northern Ireland Assembly have voted five times in the past on whether to introduce same-sex marriage in the region but the motion has been blocked by the Democratic Unionist Party (DUP) – the party Theresa May is currently relying on for her parliamentary majority after the inconclusive general election result in June.

Arlene Foster, the DUP leader, has vowed to continue blocking any attempt to pass same-sex marriage at Stormont despite majority support for the legislation.

“I could not care less what people get up to in terms of their sexuality, that’s not a matter for me – when it becomes a matter for me is when people try to redefine marriage,” Ms Foster said earlier this year.

The judge in Belfast heard the cases together due to the similarities of the legal arguments.

The first case – known as Petition X due an anonymity order – involved two men who married in London in 2014 and were attempting to get their union recognised in Northern Ireland.

Their marriage was changed to a civil partnership in law when they moved to Northern Ireland.

In the second case, two couples in civil partnerships – Grainne Close and Shannon Sickles and Chris and Henry Flanagan-Kane – argued the prohibition breaches their human rights.

Both couples were, respectively, the first and second in the UK to enter into a civil partnership after Northern Ireland became the first part of the UK to make that option available in December 2005.