Argentina has become the first Latin American country to let homosexual couples marry and adopt children, defying Catholic opposition to join the ranks of a few mostly European nations with similar laws.
Argentina's senate passed a homosexual marriage law early on Thursday following more than 14 hours of charged debate, as hundreds of demonstrators rallied outside Congress in near-freezing temperatures. Senators voted 33-27 for the proposal, with three abstentions.
"We're now a fairer, more democratic society. This is something we should all celebrate," Maria Rachid, a leading homosexual rights activist, said as supporters of the law hugged each other and jumped up and down.
Argentina's president Cristina Fernandez supports homosexual marriage on the grounds of human rights and is expected to sign the law after her return from a state visit to China.
The proposal cleared Argentina's lower house in May.
Fernandez told state news agency Telam that the law was a "positive step that defends minority rights".
A nominally Roman Catholic country, Argentina is now at the vanguard of homosexual rights in the region.
Church leaders had campaigned against the measure, rallying tens of thousands of opponents, from children to elderly nuns, in a demonstration outside Congress on Tuesday.
But opinion polls show most Argentines support homosexual marriage.
"Just like with divorce, women's right to vote, and civil marriage, with the passage of time we'll be able to appreciate the benefits of this law," senator Eugenio Artaza told local television.
The Argentine president's backing for the bill has pitted her against the Catholic church a year before a presidential election.
Cardinal Jorge Bergoglio, archbishop of Buenos Aires, had raised particular concern about the adoption clause of the bill, saying it was important to ensure that children had as role models "both a father and a mother".
Pundits have said Fernandez's stance was meant to help bolster her party's leftist credentials. Nestor Kirchner, Fernandez's predecessor and husband, is widely expected to run again for the presidency in October 2011.
Only a small number of countries permit same-sex marriage, including The Netherlands, Sweden, Portugal, and Canada. In the United States, homosexual couples can marry in five states and in the capital, Washington, DC.
Same-sex couples in Mexico City won the same rights as heterosexuals to marry and adopt children in December, under a law passed by city legislators. Uruguay allows same-sex couples to adopt children but not to marry.
Argentina's cosmopolitan capital, Buenos Aires, is known as a "gay-friendly" tourist destination.