Brazil is now the second nation in South America to legally recognise homosexual partnerships.
It is a landmark decision for gay rights in a country with the world's largest population of Catholics.
A ruling by the federal supreme court gives gay couples most of the rights enjoyed by heterosexual partners, including pension benefits, inheritance and possibly the right to adopt children, Reuters reports.
Most major cities in Brazil have open gay communities, but the Catholic Church had argued against the decision, saying the only union referred to in the Brazilian constitution is that between a man and a woman.
Argentina also recognises homosexual partnerships.