A gay couple whose marriage was downgraded to civil partnership status on their return to Northern Ireland suffered unjustified discrimination, the Court of Appeal has ruled.
Senior judges identified a failure to provide them with the same recognition as heterosexual couples in the region who wed elsewhere.
But with equal status now ensured through new legislation, no formal declaration was made on any human rights breach.
The ruling marks the culmination of a six-year legal battle by the couple at the centre of the case.
The two men said they may now seek damages for the period of discrimination covered by the judgment, their lawyer said.
Granted anonymity in the proceedings, Petitioner 'X' and his husband wed in London in 2014.
They issued proceedings to secure a declaration that their marriage remains fully constituted throughout the United Kingdom.
Until this year the couple could only be classified as civil partners in their native Northern Ireland, an alleged reduction in relationship status which they said violated their human rights.
The situation changed in January, however, when same-sex laws passed at Westminster brought the region into line with the rest of the UK and the Republic of Ireland.
It enabled gay couples to get married in Northern Ireland, while the relationship status of those who had already wed elsewhere was also ensured the same recognition.
Before those developments, however, the High Court had dismissed Petitioner X's initial challenge.
In August 2017 a judge held that it was up to government and parliament to provide same-sex marriage rights, not the judiciary.
Appealing that verdict, counsel for Petitioner X stressed the case was about the right to equal recognition of an existing marriage performed in the UK under the law of Northern Ireland, and the related entitlement to remain married throughout the UK.
With any heterosexual couples who wed in England remaining married if they move to Northern Ireland, the barrister claimed the situation her client faced was "derogatory and undermines his marriage".
The challenge was taken against the Northern Ireland Assembly and the UK Government.
In a separate ruling earlier this month the Court of Appeal said the prohibition on same-sex couples getting married in Northern Ireland over a period from August 2017 to January this year could not be justified.
Delivering judgement in the Petitioner X case today, Lord Chief Justice Sir Declan Morgan confirmed: "The failure to recognise the appellant's marriage must give rise to the same unjustified discrimination as compared ton heterosexual couples whose marriages were recognised in similar circumstances."
He then concluded: "The legislative changes introduced by the 2019 Act mean that there is no purpose to be served by any order in this case."
Following the ruling Petitioner X's solicitor, Ciaran Moynagh of Phoenix Law, said: "We are relieved the court has found there was unjustified discrimination.
"My client has always wanted respect and dignity in Northern Ireland for their marriage."
Mr Moynagh added: "We are going to read the judgment carefully and consider our position - there could potentially be a claim for damages for a breach of European Convention rights over a period of two and a half years."