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.