Gays in Germany will now be allowed to register their partnerships despite fierce conservative opposition.
Lesbians and gays who register their relationships will be accorded the same inheritance and health insurance rights as heterosexual couples. Under the law, couples will also be required to seek a court decision to divorce. Foreigners who are in a "registered life partnership" will also be allowed to join their partners in Germany.
However, the new law will not grant lesbian and gay couples the tax advantages available to heterosexual married pairs or the right to adopt children.
Gay activists recognised that although same-sex couples are given less legal recognition than a heterosexual marriage, it is a great leap forward in the right direction.
Conservative-ruled states of Bavaria and Saxony have appealed against the new law, arguing that it is an attack on family values which is enshrined in the constitution. While the constitutional court in Karlsruhe dismissed appeals last month, it will give a final decision on whether the legislation contravenes the constitution next year.
Germany is the latest European country to give legal status to same-sex couples, following Denmark, France, Sweden, Iceland and Norway.