The Court of Appeal has rejected an appeal that would have seen a gay man given the same pension rights as a wife.
John Walker retired in 2003, before the introduction of gay civil partnerships, on a pension worth around £85,000 a year from chemical firm Innospec, the BBC reports.
He entered a civil partnership in 2006 and later converted this into a marriage.
However, the court rejected the claim because it applied to a period before gay civil partnerships were legally recognised.
Walker’s partner is set to receive just £500 a year in the event of his death, compared to around £41,000 if he had married a woman, his lawyers argued.
Speaking after the ruling Walker said: “I paid exactly the same contributions as my heterosexual colleagues.
“Yet my husband – with whom I have lived for over 20 years – will be entitled to nothing from the company on my death.”
He added: “How can this constitute anything other than the most flagrant discrimination?”
Lord Justic Underhill said: “I can understand that Mr Walker and his husband will find this conclusion hard to accept.
“But changes in social attitudes, and the legislation that embodies those changes, cannot fully undo the effects of the past.”