The Supreme Court yesterday ruled in favour of a gay mans case to secure his husband the same pension benefits a wife would receive.
Retired chemical company worker John Walker, 66, won his five-year legal battle against former employer Innospec, after it used a loophole to exclude same-sex partners from spousal benefits paid into pensions.
However, this was ruled to be discriminatory and in breach of EU rules, with the landmark decision potentially impacting thousands of businesses and couples across the UK.
Walker said: "I am absolutely thrilled at the ruling, which is a victory for basic fairness and decency.
"Finally this absurd injustice has been consigned to the history books - and my husband and I can now get on with enjoying the rest of our lives together.
"But it is 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."
Walker retired from Innospec in 2003, having worked at the company for more than 20 years, making the same contributions to its pension scheme as his heterosexual colleagues.
However, an exemption in the Equality Act meant that, should he die, Innospec would not have had to pay his husband benefits for the money put into the company's scheme prior to 2005.
This would have resulted in the husband receiving only a few hundred pounds a year, rather than the £45,000 he would have been provided with if he were a woman.
The Department for Work and Pensions had supported Innospec's position, arguing that gay couples should not benefit from the same pensions arrangements as heterosexual couples.
But since the European Communities Act 1972, UK courts have had the power to disapply national law where it conflicts with EU law, resulting in yesterday's decision.
Emma Norton, a lawyer from Liberty, which represented Mr Walker, said: "This ruling was made under EU law and is a direct consequence of the rights protection the EU gives us. We now risk losing that protection.
"The government must promise that there will be no rollback on LGBT rights after Brexit - and commit to fully protecting them in UK law."