Gay couples faced unjustified discrimination while denied the opportunity to marry in Northern Ireland, the Court of Appeal ruled today.
But with changes to the law meaning same-sex weddings can now take place in the region, senior judges decided not to make a formal declaration on any human rights breach.
The verdict came in challenges by two couples to the previous ban on them getting married.
Grainne Close and her partner Shannon Sickles, along with Chris and Henry Flanagan-Kane, brought proceedings over the earlier prohibition.
In 2005 they became the first couples in the UK to enter civil partnerships, cementing their relationships in ceremonies at Belfast City Hall.
However, it was not until January this year that same-sex marriage became legal in Northern Ireland - bringing it into line with the rest of the UK and Republic of Ireland.
The regulations were passed by Westminster before the restoration of devolved government at Stormont.
MLAs had previously voted on same-sex marriage five times - with a narrow majority in favour of its introduction back in November 2015.
However, the Democratic Unionist Party deployed a petition of concern mechanism to block the motion.
Lawyers for the two couples sought to judicially review the Department of Finance in a bid to have the ban which then existed declared unlawful.
It was contended that they were subjected to discrimination on the basis of their sexuality.
In 2017 a judge dismissed the case, finding that it was a matter for the Stormont administration rather than the courts.
Appealing that determination, counsel for the couples claimed the State's failure to include the people of Northern Ireland in same-sex marriage legislation breached their human rights.
Delivering judgment today, Lord Chief Justice Sir Declan Morgan acknowledged the impact of moves in 2015 to legalise gay marriage in Scotland and the Irish Republic.
There are "strong ties of kinship and friendship" between Northern Ireland and those two countries, he noted.
"People who were married in those jurisdictions did not have their marriages recognised here and those who had formed civil partnerships here were prohibited from solemnising marriages in their own neighbourhood unlike their friends and relatives in those jurisdictions," he said.
"In our view the events of 2015 and their consequences increasingly called into question the balance between the interests of those favouring tradition and the interests of those
denied the opportunity to be seen as equal and no longer separate."
Sir Declan confirmed: "We are satisfied that it was clear by the time of the delivery of the first instance judgment in this case in August 2017 that the absence of same-sex marriage in this jurisdiction discriminated against same-sex couples, that a fair balance between tradition and personal rights had not been struck and that therefore the discrimination was not justified."
But he concluded: "In light of the legislative developments, there is no purpose to be served by making a declaration under... the Human Rights Act."