Same-sex marriage is legal in Mexico City, having been approved by its Legislative Assembly on 21 December 2009, and signed into law by Head of Government Marcelo Ebrard on 29 December 2009. The law became effective on 4 March 2010. Mexico City was the first jurisdiction in Mexico to legalize same-sex marriage, and the first in Latin America to do so, followed by Argentina in July 2010.
Civil unions, known as "sociedades de convivencia" in Spanish, which offer some of the rights, benefits and obligations of marriage, have been recognized for same-sex couples since March 2007.
Civil unions.
Being the seat of the Powers of the Union, Mexico City did not belong to any particular state but to all. After years of demanding greater political autonomy, residents were given the right to directly elect the Head of Government of Mexico City and the representatives of the unicameral Legislative Assembly (ALCDMX) by popular vote in 1997. For the following two decades, the center-left Party of the Democratic Revolution (PRD) controlled both political powers.
In the early 2000s, Enoé Uranga, an openly lesbian politician and activist, unsuccessfully pushed a bill that would have legalized same-sex civil unions in Mexico City under the name "Ley de Sociedades de Convivencia". Despite being passed four times by legislative commissions, the bill repeatedly got stuck in plenary voting for its sensitive nature, which could be attributed to widespread opposition from right-wing groups and Head of Government Andrés Manuel López Obrador's ambiguity concerning the bill. Nonetheless, as new left-wing Head of Government Marcelo Ebrard was expected to take power in December 2006, the Assembly decided to take up the bill and approved it in a 43–17 vote on 9 November 2006.
The law was well received by feminist and LGBT groups, including Emilio Álvarez Icaza, then-chairman of Mexico City's Human Rights Commission, who declared that "the law was not a threat to anyone in particular, and that it will be a matter of time before it shows positive consequences for different social groups." It was strongly opposed by right-wing groups such as the National Parents' Union and the Roman Catholic Church, which labeled the assemblymen who voted for the law as "sinners", and complained it was "vengeance against the Catholic Church from the more radical groups from the left, who felt it was a demand for justice." 
The law officially took effect on 16 March 2007. Mexico City's first same-sex civil union was between Jorge Cerpa, a 31-year-old economist, and Antonio Medina, a 38-year-old journalist. By December 2009, 736 same-sex civil unions had taken place in the city, of which 24 (3%) had been annulled.
Same-sex marriage.
On 24 November 2009, PRD Assemblyman proposed a bill that would legalize same-sex marriage in Mexico City. According to Razú, "gays and lesbians pay taxes like everyone else, obey the law like everyone else, build the city like everyone else, and there is no reason they should have a different and special set of rules." The bill sought to modify the definition of marriage contained in the Civil Code using gender-neutral language. Razú added that the bill was "to be in agreement with Article 1 of the Constitution of Mexico, which says that no person can be discriminated against for any reason, and with Article 2 of the Civil Code, which says that no person can be deprived of the exercise of their rights for reasons of sexual orientation." 
Assemblyman Emiliano Aguilar (PRI) was criticized for giving out homophobic pamphlets, which showed transgender prostitutes with the inscription "Lawmaker, would you like to see your children ending up like this? Do not promote homosexuality." Luis González Plascencia, chairman of the Human Rights Commission of Mexico City, backed the bill and said it was up to the Legislative Assembly to consider adoption rights. The International Lesbian, Gay, Bisexual, Trans and Intersex Association (ILGA), Amnesty International, the AIDS Healthcare Foundation and over 600 non-governmental organizations expressed support for the legalization of same-sex marriage in Mexico City. The National Action Party (PAN) announced it would either go to the courts to appeal the law or demand a referendum. However, a referendum on same-sex marriage was rejected by the Legislative Assembly in a 36–22 vote on 18 December 2009.
On 21 December 2009, the Assembly approved the legalization of same-sex marriage in a 39–20 vote. Head of Government Marcelo Ebrard had been expected to sign the bill. The legislation changed the definition of marriage in the city's Civil Code from "a free union between a man and a woman" to "a free union between two people". The law was written to allow same-sex couples to adopt children, apply for bank loans, inherit wealth and be included in the insurance policies of their spouse, among other rights they were previously denied under the civil union law. PAN vowed to challenge the law in the courts. 
On 29 December 2009, Ebrard signed the bill into law and it became effective on March 4, 2010. On August 5, the Supreme Court voted 9–2 to uphold the constitutionality of Mexico City's same-sex marriage law. On August 10, 2010, the Supreme Court ruled that same-sex marriages performed in Mexico City must be recognized throughout the country.
On 11 December 2016, the Constituent Assembly of Mexico City, a body formed to create a constitution for Mexico City, voted 9–7 to include the right to same-sex marriage in the draft text. In early January 2017, the Constituent Assembly voted in its plenary session 68–11 to fully enshrine same-sex marriage in the Mexico City Constitution. Article 11(H)(2) reads: "Equal rights are recognized for families formed by same-sex couples, with or without children, who are under the figure of civil marriage, concubinage or some other civil union."
Statistics.
More than 270 same-sex couples married in Mexico City between March and July 2010.
The following table shows the number of same-sex marriages performed in Mexico City since legalization in 2010 as reported by the National Institute of Statistics and Geography. Figures for 2020 are lower than previous years because of the restrictions in place due to the COVID-19 pandemic.
About 6,000 same-sex marriages were performed in the city in the first five years following the law's enactment. 30% of the marriages were between couples from other states and only 2% had ended in divorce.
Public opinion.
An opinion poll conducted in September 2009 showed that the population of Mexico City was almost evenly divided on the issue of same-sex marriage, with 48% in favour and 46% against.
From 27 November to 30 November 2009, major newspaper "El Universal" polled 1,000 Mexico City citizens concerning the legalization of same-sex marriage in the city: 50% supported it, 38% were against it and 12% had no opinion. The same poll showed that support was stronger among the younger population (age: 18–29), 67%, and weaker among the oldest (age: 50 and up), 38%. With 48%, the most cited reason was "right of choice" for the supporters, followed by "everybody is equal" with 14%. 39% of the opponents cited "it is not normal" as the main reason to not support same-sex marriage, followed by "we lose values" with 18%.
A 2017 opinion poll conducted by "Gabinete de Comunicación Estratégica" found that 63% of Mexico City residents supported same-sex marriage, while 32% were opposed.
According to a 2018 survey by the National Institute of Statistics and Geography, 29% of the Mexico City public opposed same-sex marriage, the lowest in all of Mexico.
Opposition.
The National Action Party issued a statement calling the same-sex marriage bill "an electoral ploy by the PRD that mocks and abuses the LGBT community". The Roman Catholic Church strongly opposed the law when it was taken up by the city Legislative Assembly, by calling same-sex marriage, among other things, "immoral", saying marriage must hold the promise of procreation, something that is possible only between a man and a woman. Armando Martínez Gómez, president of a Catholic attorneys group, called on Head of Government Marcelo Ebrard to veto the bill, which Martínez noted went further than the city executive had intended when legislators removed a clause that would have forbidden adoption.
References.
 ;templatestyles src="Reflist/styles.css" / ;