A gay man has won a landmark legal battle to give his husband the same pension rights as a wife would receive.

Ex-cavalry officer John Walker, 66, was told by Court of Appeal judges two years ago that his attempt to claim equal pension rights for his husband had failed because his pension had been accrued before civil partnerships were recognised by the law in 2005.

But on Wednesday (July 12) five Supreme Court judges unanimously ruled that Mr Walker’s husband is entitled to a full spouse’s pension in the event of his death, provided they stay married, the BBC reports.

The ruling means Mr Walker’s husband will now be entitled to a spousal pension of about £45,000 a year, rather than around £1,000 a year.

Human rights organisation Liberty, which backed Mr Walker’s claim, said the ruling would “dramatically change the lives of thousands of same-sex couples”.

Mr Walker retired from chemical group Innospec Ltd in Cheshire in 2003 after 23 years of work with a pension worth £85,000 a year.

He entered a civil partnership with his partner – who he has been in a relationship with since 1983 – in 2006 and has since converted the union into a marriage, but because he retired before laws banning sexual orientation discrimination were introduced in 2010, the most his husband could claim in the event of Mr Walker’s death was about £1000 a year.

An Employment Tribunal in Manchester originally ruled in Mr Walker’s favour in 2012, saying Innospec’s scheme contravened European equality laws, but the ruling was overturned after the company appealed, with the support of the Department for Work and Pensions.

Mr Walker’s own appeal was dismissed in 2015 by the Court of Appeal, leading to today’s landmark ruling in the Supreme Court.

Mr Walker said it was “to our government’s great shame that it has taken so many years, huge amounts of taxpayers’ money and the UK’s highest court to drag them into the 21st century”.

“In the years since we started this legal challenge, how many people have spent their final days uncertain about whether their loved one would be looked after?”

He added: “My husband and I can now get on with enjoying the rest of our lives together.”

More stories:
Heroes producer reveals actor threatened to quit show over gay storyline
Simon Dunn: It’s ‘selfish’ of the LGBT community to expect closeted athletes to come out