A German high court has granted homosexual civil unions the same tax benefits as heterosexual married couples, a victory for gay rights campaigners and a defeat for the government.

The Federal Constitutional Court in Karlsruhe ruled Thursday that treating the two forms of partnership differently for tax purposes violates the country's guarantee of equal rights.

Chancellor Angela Merkel's center-right government has long resisted granting homosexual couples in civil unions the same tax benefits.

Married couples in Germany are able to jointly declare their taxable incomes, which can significantly lower their overall tax burden especially when one partner has higher pay

The court ordered the government to retroactively amend the relevant laws dating back to 2001, when civil union status was first introduced.