Brazil's high court has ruled in favor of civil partnerships for gay and lesbian couples, Reuters reported.

In a ruling handed down on Thursday, 10 judges of the Federal Supreme Court decided that gay couples have the right to form a civil partnership. An eleventh judge, Jose Antonio Dias Toffoli, recused himself from the case. Toffoli had worked on the case as attorney general.

“The freedom to pursue one's own sexuality is part of an individual's freedom of expression,” said Justice Carlos Ayres Britto, the ruling's author.

The union allows gay couples in Latin American's largest country access to pension benefits, inheritance and possibly the right to adopt children.

The challenge was filed by the governor of the state of Rio de Janeiro, Sergio Cabral. Rio recognizes gay couples with civil unions.

An effort to make Brazil the second Latin American country behind Argentina to legalize gay marriage was introduced in March by Representative Jean Wyllys. Gay marriage is also legal in the self-governing city-state of Mexico City, and the nation's highest court has ruled that all states must recognize such marriages. Uruguay lawmakers are also considering a gay marriage bill.