Northern Ireland's High Court has rejected two legal challenges that sought to recognize same-sex unions as marriages, saying it is a matter for the legislature.

Justice John O'Hara said that European law allows governments to introduce "gay marriage," but does not require it.

Lawyers for several couples had argued that the Northern Ireland law violates Article Eight of the European Convention on Human Rights and denied respect for their clients' private and family lives, BBC News reports.

Any further action is affected by the political crisis in Stormont, the Northern Ireland legislature. A power-sharing agreement between Sinn Fein and the Democratic Unionist Party collapsed in January 2017, after more than 10 years of joint rule between nationalist and unionist politicians.

Deputy First Minister Martin McGuinness of Sinn Fein resigned in protest Jan. 10 over allegations that First Minister Arlene Foster of the Democratic Unionist Party mishandled overspending on a renewable energy heating program.  

The collapse triggered fresh elections.

Ahead of the elections, Northern Ireland's Catholic bishops issued a February statement stressing the importance of recognizing marriage as the union of one man and one woman, among other issues. To recognize other relationships as the same thing undercuts the importance of the biological bond and natural ties between parents and children, they said.

They cited Pope Francis' apostolic exhortation "Amoris Laetitia," which said same-sex unions are not the same as marriage and are not analogous to God's plan for marriage and the family.

In the debate over restoring the power-sharing agreement, Sinn Fein has demanded that the Democratic Unionist Party allow same-sex marriage to be recognized, the Belfast Telegraph says.

Northern Ireland had introduced same-sex partnerships in 2005, the first place in the U.K. to do so.

The first couple to contact such a partnership, Shannon Sickles and Grainne Close, were among the parties to one of the cases before the High Court. The other parties to their case were Chris and Henry Flanagan-Kane, the second couple to contract a same-sex partnership in Northern Ireland.

Close said their children were being treated differently as a result of the court's decision.

A second case under consideration involved an anonymous couple who had contracted a same-sex union recognized as a marriage in England, and wanted it legally recognized in Northern Ireland.

Members of the Northern Ireland Assembly had voted five times on whether to recognize the unions as marriages. The fifth vote, held in November 2015, resulted in the first time such unions were approved, by a vote of 53-52.

The Democratic Unionist Party then used a Stormont veto, called a petition of concern, to block the motion and prevent the law from changing. It cited the need to protect traditional marriage.

Paula Bradshaw, an assembly member for the Alliance Party, said both Sinn Fein and the Democratic Unionist Party had rejected her party's proposal to reform the petition of concern.

(Story continues below)

Colum Eastwood, leader of the Social Democrat and Labour Party, was among those who voiced opposition the court's decision.