Uruguay's Senate has voted to legalise gay marriage by approving a single law governing matrimony for heterosexuals and homosexuals.
Senators voted 23-8 in favour of the bill, which was passed by the lower house in December. It must now return to the lower chamber of Congress with changes.
If approved, the law would make Uruguay the second nation in Latin America and the 12th in the world to legalise gay marriage. Argentina legalised same-sex marriage in 2010.
"It goes beyond homosexuality, it's about a law where everyone shares the same rights and obligations," said Federico Grana, a lawmaker in the ruling Frente Amplio coalition and a member of the Black Sheep Collective, a gay rights group that presented the bill's first draft.
The bill lets couples, gay or straight, decide whose surname goes first when they name their children. It also clarifies rules for adoption and in-vitro fertilization, and eliminates the words "husband and woman" in marriage contracts, referring instead to the gender-neutral "contracting parties".
"This is an issue of liberty, of people's choice and justice," said Sen. Rafael Michelini.
"Liberty because the state should not meddle in who you should marry; of justice because if you marry abroad with someone of the same sex and later return to Uruguay, your marriage should be recognised."
The Roman Catholic Church opposes the proposal, but the church has little political influence in secular Uruguay, which became the first Latin American country to legalise abortion last year.
President Jose Mujica has been pushing for liberal-leaning proposals in his mandate and says he plans to sign the marriage bill into law.