A judge in Northern Ireland has dismissed two challenges to the nation's laws that do not allow gay and lesbian couples to marry.

According to the Belfast Telegraph, Mr. Justice O'Hara disagreed with plaintiffs, saying that the ban did not violate the rights of LGBT couples.

Northern Ireland is the only part of the United Kingdom where such rights are not extended to gay couples. Northern Ireland recognizes gay couples with civil unions.

O'Hara also ruled that downgrading the marriages of gay couples to civil unions when they move to Northern Ireland is lawful.

One of the cases revolves around two couples in civil partnerships who were denied marriage licenses. A married male couple is fighting the ban in the second case. They argue that their British marriage should be recognized by Northern Ireland. They also claim that the government discriminated against them when it “downgraded” their marriage when they moved to Northern Ireland.

The cases were combined because of their similarity.

O'Hara dismissed both cases, saying that none of the couples' rights had been violated under European law.

“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,” O'Hara wrote. “However, the judgment which I have to reach is not based on social policy but on the law.”

The Democratic Unionist Party (DUP) has blocked efforts to introduce same-sex marriage in the region.

(Related: Irish PM Leo Vardkar says same-sex marriage in Northern Ireland only a matter of time.)