Image copyright Press Eye Image caption A joint case was taken by the first lesbian couple and the first gay couple to enter civil partnerships in the UK

The High Court has dismissed two cases challenging Northern Ireland's ban on same-sex marriage.

Delivering his judgement, a judge said it was for the Stormont Assembly, and not a judge, to decide social policy.

A joint case was taken by the first lesbian couple and the first gay couple to enter civil partnerships in the UK.

The second case was brought by a couple who wed in England but want their marriage legally recognised at home in Northern Ireland.

Image copyright Pacemaker Image caption In 2005, Grainne Close and Shannon Sickles were the first lesbian couple in the UK to celebrate a civil partnership

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

Mr Justice O'Hara said: "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.

"However, the judgment which I have to reach is not based on social policy but on the law."

Same-sex marriage is legal in England, Scotland, Wales and the Republic of Ireland, but is banned in Northern Ireland.

Shannon Sickles, Grainne Close, and Chris and Henry Flanagan-Kane were challenging Stormont's refusal to legislate for same-sex marriage.

Media playback is unsupported on your device Media caption BBC News NI looks at the history of Northern Ireland's same-sex marriage debate

Ms Close said she was "devastated" by the ruling.

"For us, this is a personal matter," she said.

"We have families and our children are being treated differently because of today's result."

Her partner, Ms Sickles, said they would continue their legal challenge.

Timeline of same-sex marriage:

Twelve years ago, Northern Ireland was the first place in the UK to introduce civil partnerships.

Ms Sickles and Ms Close made history on 19 December 2005 when their relationship was legally recognised in the UK's first civil partnership ceremony at Belfast City Hall.

They were closely followed by Chris and Henry Flanagan-Kane, whose civil partnership took place later that same day.

Image copyright Pacemaker Image caption Chris and Henry Flanagan-Kane were the first gay couple to become civil partners

During the joint challenge to the law in Northern Ireland, the couple's lawyers argued that the ban breaches Article Eight of the European Convention on Human Rights, by denying respect for their private and family lives.

But a lawyer for Stormont's Department of Finance and Personnel (DFP) countered that the ban was not a breach of human rights and that civil partnerships already met the minimum requirements set out under human rights law.

The couple who married in England had been granted anonymity, and their case was referred to as Petition X.

Image copyright Pacemaker Image caption Shannon Sickles and Grainne Close, pictured in 2015, have asked a judge to rule on whether the same-sex marriage ban is a breach of their human rights

The campaign for same-sex marriage has been highly divisive at the Northern Ireland Assembly in recent years, and is currently one of the main sticking points in Stormont's continuing political crisis.

Assembly members (MLAs) have voted five times on whether or not to introduce same-sex marriage.

'The wind is to our back'

During the fifth vote in November 2015, MLAs voted in favour of legalisation for the first time, with the slimmest majority of 53 votes to 52.

However, the Democratic Unionist Party (DUP) used a Stormont veto, known as a petition of concern, to block the motion and prevent any change in the law.

Alliance MLA Paula Bradshaw said it was "shameful" the couples had been forced to take their cases to court.

Image copyright PACEMAKER Image caption Alliance MLA Paula Bradshaw said the challenge had been thrown "firmly" back at politicians

"Last May both Sinn Féin and the DUP refused the Alliance Party's proposal to reform the petition of concern - the crucial reform that would make equal marriage a reality," she said.

"Now the challenge has been thrown firmly back at the politicians and it is essential we get Stormont up and running again to stabilise Northern Ireland and start delivering for everyone."

The marriage of the couple in the Petition X case was treated as a civil partnership in Northern Ireland, under the terms of the Marriage (Same Sex Couples) Act 2013,

The devolved distinction was made possible after negotiations between a previous Westminster government and a previous Northern Ireland Assembly.

The couple took their vows "because they believe in the traditional values associated with marriage," according to their solicitor.

'Punching bag'

"We sighed when the ruling was read out not through disappointment, but simply because the inevitable recognition of same-sex marriage has been further delayed in Northern Ireland," they said.

"The work will continue, the wind is to our back."

SDLP leader Colum Eastwood said The LGBT community was "not a punching bag to be hit again and again".

"Ours is now the only small corner of these islands where we maintain a hierarchy of love," he said.

"We are increasingly isolated here and across Europe as a place where the commitment and compassion of a same-sex couple is not recognised or reflected in our law."

Sinn Féin MLA Carál Ní Chuilín said the issue was at the heart of the current political crisis in Northern Ireland - where the Assembly has been in limbo since power-sharing broke down in January.

"We need to see the implementation of agreements and an end to discrimination if we are to have sustainable political institutions," she said.