The ruling will apply to countries which recognise same-sex marriage
A gay man in Germany may be entitled to his dead partner's pension following a ruling by the highest court in the EU.
Tadao Maruko's partner died in 2005 but the pension fund refused him a widower's pension and the case was sent to the European Court of Justice (ECJ).
The court ruled that refusing a pension was direct discrimination if the partnership was comparable to marriage.
Mr Maruko's lawyers predict the case will have repercussions in EU countries where same-sex partnerships are legal.
"I'm happy. It's a very important step," lawyer Helmut Graupner told the BBC News website.
"This will help all those countries which have registered partnerships. It's the first time the ECJ has ruled in favour of same-sex couples."
GAY MARRIAGES IN THE EU
Full marriage recognised: Spain, Netherlands, Belgium
Legal partnerships similar to marriage: Germany, Sweden, Denmark, UK, Czech Republic, Slovenia, Hungary, Finland, Portugal
Civil contracts: France, Luxembourg
No provision: Austria, Baltic states, Cyprus, Greece, Malta, Romania, Bulgaria, Italy, Ireland, Poland, Slovakia
The court based its ruling on an EU directive which states that there should be no discrimination on the grounds of sexual orientation.
Although German law considers only heterosexual unions as marriage, the ruling makes it clear that any country in the EU that gives same-sex couples rights equivalent to marriage should treat the two as comparable.
The European Commission welcomed the decision, but emphasised that national governments rather than the EU were in charge of legislation on family law.
"It all depends on the law of the country. The right to a survivor's pension exists if the two regimes [marriage and gay partnership] are analogous," said commission spokesman Johannes Laitenberger.
Mr Graupner said the ruling would have significant repercussions for the UK and Scandinavia where same-sex partners had "mirror institutions" to marriage, rather than French-style civil contracts.
But he also suggested that indirectly it would help gay couples in countries where there was no equivalent to marriage.
"The next case may be one of indirect discrimination, from a country that excludes same-sex partners from the rights and obligations of marriage.
"The way out for such a country would mean they would have to provide the same benefits as other countries," he said.