In response to court action in a number of states, the United States federal government and a number of state legislatures passed or attempted to pass legislation either prohibiting or allowing same-sex marriage or other types of same-sex unions.

On June 26, 2015, the Supreme Court of the United States ruled in the case of Obergefell v. Hodges that a fundamental right to marry is guaranteed to same-sex couples by the Fourteenth Amendment, and that states must allow same-sex marriage.

Federal level
In 1996, the United States Congress passed and President Bill Clinton signed Public Law 104–199, the Defense of Marriage Act (DOMA). Section 3 of DOMA defines "marriage" and "spouse" for purposes of both federal law and any ruling, regulation, or interpretation by an administrative bureau or agency of the United States government. The impact of Section 2 of DOMA, which relieves jurisdictions within the United States of any obligation to recognize same-sex relationships legally established in any other jurisdiction, is less clear.

In United States v. Windsor, the Supreme Court was asked to determine the constitutionality of Section 3 of DOMA, which defines marriage for federal purposes as the union of a man and a woman. On June 26, 2013, the Supreme Court ruled by a 5–4 vote that the Section 3 of DOMA is unconstitutional.

The State Marriage Defense Act, introduced in the House of Representatives on January 9, 2014, would require the federal government to recognize the validity of a marriage based on a person's legal residence (place of domicile), rather than on the validity of the marriage when and where it was solemnized (place of celebration). The Obama administration has generally used the latter standard. Its sponsors described it as a way to clarify the federal government's response to Windsor and restore the ability of the a state to control the definition of marriage within its borders.

In Obergefell v. Hodges, the Supreme Court was asked to determine the constitutionality of state bans on same-sex marriage licenses as well as state bans on recognition of same-sex marriages from other states. On June 26, 2015, the court ruled by a 5–4 vote that the Fourteenth Amendment obliges states to license same-sex marriages and to recognize same-sex marriages from other states.

In the , and  Congresses, the Respect for Marriage Act (RFMA) was introduced by House and Senate Democrats to repeal DOMA. These efforts eventually prevailed in 2022, with the bill passing the House 267–157 and the Senate 61–36. President Joe Biden signed the bill into law on December 13, 2022.

State level

Efforts to enable same-sex unions
Votes by state legislatures to recognize various types of same-sex unions, sorted by date:

Notes:
 Veto overridden
 People's veto (Maine Question 1, 2009)
 People's veto failed (Washington Referendum 71, Washington Referendum 74, Maryland Question 6)
 The bill was allowed to lapse into law.

Efforts to prohibit same-sex unions
Votes by state legislatures to prohibit recognition of various types of same-sex unions, sorted by date:

Notes:
  On June 26, 2015, the Supreme Court of the United States ruled in the case of Obergefell v. Hodges that a fundamental right to marry is guaranteed to same-sex couples by the Fourteenth Amendment, and that states must allow same-sex marriage.
  Subsequently, repealed.
  The bill was allowed to lapse into law.
  Veto overridden.

Attempts to establish same-sex unions via initiative or statewide referendum

Efforts to enable ban amendment

Notes:
  Subsequently, repealed.

Efforts to ban same-sex unions by constitutional amendment

The following table shows all popular vote results regarding state constitutional amendments concerning same-sex marriage, and in some cases civil unions and domestic partnerships. The Hawaii amendment is different in that it granted the legislature authority to "reserve marriage to opposite-sex couples" (which the legislature had already done).

Notes:
  On June 26, 2015, the Supreme Court of the United States ruled in the case of Obergefell v. Hodges that a fundamental right to marry is guaranteed to same-sex couples by the Fourteenth Amendment, and that states must allow same-sex marriage.
  On June 26, 2013, the United States Supreme Court ruled that supporters of the measure did not have standing in federal court to defend the August 2010 ruling by Northern District of California's Chief Judge Vaughn Walker that the amendment was unconstitutional under both the Due Process and Equal Protection Clauses of the Fourteenth Amendment, effectively killing the ballot initiative.
  Does not explicitly define marriage, but allows the legislature to define marriage.
  On June 28, 2013, U.S. District Judge David M. Lawson issued a preliminary injunction blocking the state from enforcing its law banning local governments and school districts from offering health benefits to their employees' domestic partners.
   On December 20, 2013, Judge Robert J. Shelby of Federal District Court for the District of Utah, issued a 53-page ruling that said Utah's law, which was passed by voters in 2004, violated the US Constitutional rights of gay and lesbian couples to due process and equal protection under the 14th Amendment.
  Subsequently, repealed.

Post-Obergefell attempts to repeal constitutional amendments banning same-sex unions

Proposed attempts to constitutionally block same-sex unions

Efforts to ban same-sex unions by statute
The following consists of votes by statutory initiatives that ban same-sex marriage and/or civil unions and domestic partnerships:

Notes:
  There is a debate as to whether the adoption of Prop 22 only prohibited California from recognizing same-sex marriages performed in other states.
  In March 2005, Judge Richard Kramer ruled there appeared to be no rational state compelling interest in limiting marriage to heterosexual couples. His ruling was appealed to the California Court of Appeal for the 1st District, which upheld Proposition 22 on October 5, 2006. The Supreme Court of California ruled on May 15, 2008, that Proposition 22 is unconstitutional and it was struck down by the state's highest court.
  Subsequently, repealed by state legislature.

Lawsuits seeking to overturn statutory bans

The following lists cases seeking to overturn marriage bans:

See also

 Same-sex marriage in the United States
 Same-sex marriage status in the United States by state
 Same-sex marriage law in the United States by state
 Same-sex marriage in tribal nations in the United States
 Same-sex union legislation
 Divorce of same-sex couples

References