Uruguay has moved closer to legalising gay marriage after the lower house of Congress approved a law making all marriages equal.
The measure, which was passed by a wide margin, now goes to the Senate where it is expected to be approved.
It would make Uruguay the second Latin American country after Argentina to allow gay marriages.
Same-sex marriages are legal in Mexico City, while civil unions are recognised in several countries in the region.
After a long debate, Uruguayan deputies voted overwhelmingly on Tuesday night to approve the Marriage Equality Law.
"This is not a homosexual or gay marriage law. It is a measure to equalise the institution independent of the sex of the couple," said Julio Bango, one of the bill's authors.
The bill now goes to the Senate where President Jose Mujica's governing coalition has a majority.
In recent years, Uruguay has moved to allow same-sex civil unions, adoption by gay couples, and to allow gay members of the armed forces.
Uruguay's neighbour Argentina legalised gay marriage in 2010. Same-sex marriages have been legal in Mexico City since 2009.
In a recent decision Mexico's Supreme Court overturned a law in the state of Oaxaca that banned gay marriage.
The ruling could pave the way to legalisation across Mexico, according to legal experts.
In May, Brazil's Supreme Court voted overwhelmingly in favour of allowing same-sex couples the same legal rights as married heterosexuals.