Senior judges have overturned a ruling that an unmarried Co Antrim mother refused a widowed parent's allowance after the death of her partner was discriminated against on the grounds of her marital status.
Earlier this year, Belfast's High Court held that denial of the benefit to Siobhan McLaughlin could not be justified.
The potentially landmark verdict could have set a precedent for bereaved cohabiting parents to receive extra payments, costing the Government hundreds of millions of pounds.
But lawyers for Stormont's former Department for Social Development yesterday won a challenge against the ruling.
Lord Justice Weatherup, sitting in the Court of Appeal, said: "The relationship of an unmarried cohabitee is not analogous with that of a spouse or civil partner in the context of a widowed parent's allowance."
Ms McLaughlin brought a test case against the department after being refused the benefits because she was neither married nor in a civil partnership at the time of her partner's death.
The couple lived together as man and wife for 23 years before he died in January 2014. They had four children together, for whom she remains sole provider.
A key component of the family income comes from State benefits, the court heard.
But she would have been entitled to the further allowances under the Social Security Contributions and Benefits (NI) Act 1992 had she been married.
Her barristers argued that the decision unlawfully discriminated against Ms McLaughlin due to her marital situation.
They also contended that it breached her private and family life entitlements under Article 8 of the European Convention on Human Rights.
In February, a High Court judge held that the rationale for the benefit applied equally to people in Ms McLaughlin's position as to married people.
The purpose of the benefit was to diminish the financial hardship on families following the death of a parent, he found.
In his judgment, he said the bar amounted to a human rights violation by discriminating against Ms McLaughin on grounds of marital status.
However, lawyers for the department appealed, arguing the judge had wrongly decided the relationship of an unwed cohabitee was comparable to those married or in civil partnerships.
The court heard how extending the benefit to surviving, unmarried parents - with an estimated cost of £21.6m per annum - was rejected by the Government in June.
Lord Justice Weatherup, sitting with Lord Chief Justice Morgan and Lord Justice Gillen, said the State had adopted a position on marital status and bereavement benefits endorsed and reaffirmed by the courts and Parliament.
"In the present context, it is for this court to determine if the Government's assessment is manifestly without reasonable foundation," he added.
"We are unable to reach that conclusion."
Allowing the appeal and identifying no human rights violation, he confirmed: "The different treatment of cohabitees in that context is justified."