Same-sex marriage has been legal in Costa Rica since May 26, 2020 as a result of a ruling by the Supreme Court of Justice. Costa Rica was the first country in Central America to recognize and perform same-sex marriages.

On August 8, 2018, the Supreme Court of Justice of Costa Rica declared the sections of the Family Code prohibiting same-sex marriage to be unconstitutional, and gave the Legislative Assembly 18 months to reform the law accordingly; otherwise the ban would be abolished automatically. The ruling was published in the judicial bulletin on November 26, 2018, meaning that same-sex marriage would become legal no later than May 26, 2020. This followed a ruling issued in January 2018 by the Inter-American Court of Human Rights stating that signatories of the American Convention on Human Rights are required to allow same-sex marriage.

Same-sex marriage in Costa Rica

The issue was a major topic during the 2018 Costa Rican general election. After the court ruling, several unsuccessful attempts by conservative lawmakers to delay the deadline failed due to lack of support.

Same-sex marriage in Costa Rica

Civil unions

The legal recognition of same-sex unions in Costa Rica had been debated periodically from 2006, with debate resurfacing in May 2009 and causing significant controversy due to the strong influence of the Catholic Church in the nation. In August 2008, a group opposed to same-sex unions asked the Costa Rican electoral authority, the Tribunal Supremo de Elecciones (TSE), to hold a referendum on the subject, an action opposed by most organizations supporting same-sex civil unions in the country. On November 5, 2008, the TSE authorized the group to start collecting the signatures required by law to trigger the referendum (5% of registered voters). By July 2010, the required signatures had been collected and the TSE started the process to hold the referendum on December 5, 2010. In the meantime, several organizations and individuals, including the Ombudsman Office of Costa Rica, asked the Supreme Court to consider the legality of the proposed referendum. On August 10, 2010, the Constitutional Chamber of the Supreme Court (Sala IV) declared such a referendum unconstitutional. The court concluded that same-sex couples constituted a disadvantaged minority group subject to discrimination, and that allowing a referendum regarding their rights could potentially enable the non-LGBT majority to limit the rights of same-sex couples and thereby increase discrimination.

Same-sex marriage in Costa Rica

On July 2, 2013, the Legislative Assembly unanimously passed a measure that could legalize same-sex civil unions as part of a larger bill amending the General Young Person's Act (). The passing of the bill was widely acknowledged to be a mistake by legislators unaware of its implications; those voting for the bill included legislators vocally opposed to LGBT rights. The mistake, however, did not impact the legality of the bill. The bill changed article 4(m) of the Act to recognize: "The right to recognition, without discrimination contrary to human dignity, of the social and economic effects of domestic partnerships which constitute in a public, notorious, unique and stable manner, with legal capacity for marriage for more than three years." The bill also changed the Family Code to allow couples living together for three years or more to be recognized as having a common-law marriage, which would grant them some legal benefits such as alimony. The final approved version of the bill did not give marriage a definition limited by gender. On July 4, 2013, President Laura Chinchilla signed the bill into law. A statement from the Minister of Communication said that it was not up to her to veto the bill and that the responsibility for interpreting it lay with legislators and judges. In July 2013, a same-sex couple asked the Supreme Court for their union to be recognized under the new law. LGBT rights activists reacting to the law said it needed to survive a constitutional challenge in court. Some constitutional lawyers stated that same-sex couples would "still lack legal capacity" to formalize their unions despite the passage of the law.

On December 3, 2014, Vice President Ana Helena Chacón confirmed that four same-sex union proposals would be debated starting in January 2015. President Luis Guillermo Solís said on November 27 that he supported a coexistence initiative to grant couples economic rights, but none of the civil union proposals equivalent to marriage. In mid-March 2015, the Solís Government promised to prioritize two bills on the matter. On August 12, 2015, it sent a partnership proposal to the extraordinary sessions of the Legislative Assembly, seeking to make the definition of cohabitation in article 242 of the Family Code gender-neutral.