Germany's top court ruled Thursday that same-sex partners in civil unions are entitled to the generous tax benefits granted to married couples, in another landmark step for gay rights in Europe.
The Federal Constitutional Court in the southwestern city of Karlsruhe said denying gays and lesbians in so-called registered partnerships tax breaks extended to married people violated their civil rights.
The decision marks a bruising setback for Chancellor Angela Merkel's ruling conservatives less than four months ahead of a general election, as the opposition blasted her party as out of touch.
The scarlet-robed judges said their ruling applied retroactively to August 1, 2001, the day on which Germany established civil unions for same-sex couples -- a status that falls short of marriage under the law.
The court said that gay and lesbian couples must immediately be granted the same tax benefits as heterosexual married couples because there were no "substantial grounds for unequal treatment".
It said a failure to do so contravened the equality clause of Germany's Basic Law and ordered parliament to quickly pass new legislation.
Married couples who have a big difference in salary, or where one partner does not work, benefit from having their incomes pooled in the calculation of their individual tax bills.
Same-sex couples had been denied such a tax break and the ruling will mean that the German tax authorities will have to reimburse millions to gays and lesbians in civil unions who overpaid over the past 12 years.
All parties in the Bundestag lower house had expressed their support for such a policy with the exception of Merkel's conservative Christian Union bloc.
"What a joy -- another step toward equality," Katrin Goering-Eckardt, a candidate for chancellor from the opposition Greens, tweeted in reaction to the decision.
"And another embarrassment for the Merkel government."
Germany's openly gay foreign minister, Guido Westerwelle from the Free Democrats, who are junior partners in Merkel's government, also hailed the ruling.
"When loving people take responsibility for each other, the state must not discriminate against them," he told news website Spiegel Online.
"It is time that German tax law become as modern as our society."
And the Lesbian and Gay Association, a national rights group, said it represented another case in which the federal court had been forced to "tutor" the government on constitutional rights.
Merkel said in a newspaper interview in December that she did not favour putting gay couples on the same tax footing as heterosexual ones because the constitution "sees marriage as directly linked to the family and both are under special protection of the state".
The chancellor has moved her party steadily toward the centre since taking power in 2005 but gay rights remains one of the few issues on which Merkel differs sharply from the centre-left opposition.
The Social Democrats have complained that Merkel has repeatedly co-opted their issues during this year's campaign, most recently with a proposal to cap home rent increases.
Their chief whip Thomas Oppermann said the court's decision showed that Merkel's government had long discriminated against same-sex couples and had a "pre-modern view of society".
Family affairs minister Kristina Schroeder of Merkel's party broke ranks, saying that the ruling is "good and correct and clarifies something that is self-evident to more and more people in Germany".
Thursday's decision followed a ruling in February which found that gays in a civil partnership should be allowed to adopt their partners' adopted children.
Gay couples are still forbidden from adopting children together in Germany.
Neighbouring France legalised same-sex marriage last month amid a bitter controversy over the issue, making it the 14th country to do so and the seventh in the European Union.
Nine US states as well as the capital Washington have also granted gays the right to marry.