Mexico City has become the first capital city to legalise gay marriage in South America.
Same sex couples have been allowed to enter civil partnerships since 2006 but the new legislation will give gay couples equal rights when it comes to family social security benefits and loans.
The new bill will also give same sex couples the right to adopt.
David Razu, a legislator from the left-wing Social Democratic Party, told Reuters:
"We are putting an end to segregation and stigmatisation of a sector of society, giving access to full marriage rights."
Mexico has traditionally been a conservative Catholic country but Mexico City has developed a popular and vibrant gay scene in recent years.
Argentina became the first Latin American country to allow civil unions across the country for same-sex couples in 2002.
Mexico, Argentina and Uruguay have all offered same sex couples the opportunity of civil partnerships but this is the first time that full marriage has been legislated in Latin America.
Earlier this month a gay Buenos Aires couple who hoped to become the first to fully marry in Argentina said that the city mayor should be fined for not authorising their wedding.
Jose Maria Di Bello and partner Alex Freyre planned to marry on World AIDS Day after Judge Gabriela Seijas ruled last month that the ban on gay marriage violated Argentina's constitution.
Mexico’s Catholic archdiocese has stated that legalising gay marriage is immoral and will destroy families.
"Recognising homosexual civil unions as marriage goes against the public good and the emotional development of our children," said Giovanni Gutierrez, a city lawmaker from President Felipe Calderón’s National Action Party.
The decision to allow full marriage for gay couples prompted jubilation in the streets from Mexico City's LGBT community and gay rights groups.