(Reuters) - The following is a look at laws on gay marriage and same-sex civil unions in the United States after California's supreme court on Tuesday backed a ban on gay marriage.
* The first legal same-sex marriages in the United States took place in Massachusetts in 2004, a year after the state's highest court ruled that a ban on gay marriage was unconstitutional.
* California began marrying gay and lesbian couples in June 2008, a month after the state Supreme Court ruled that barring same-sex marriages was unconstitutional. But that was halted in November when Californians voted in support of a proposition to amend the state constitution to ban same-sex marriage.
* Connecticut legalized gay marriage in October 2008, when its supreme court overturned a ban on same-sex marriage. Local authorities began issuing marriage licenses in November.
* Iowa's supreme court issued a unanimous ruling on April 3 that said a gay marriage ban violated the constitutional rights of gay and lesbian couples. The state's first legal same-sex weddings took place later that month.
* On April 7, Vermont lawmakers overrode a governor's veto of a gay-marriage bill, making the New England state the first in the country to legalize gay marriage with a legislature's vote. Its law takes effect on September 1.
* The District of Columbia city council voted on May 5 to recognize same-sex marriages performed in states where those unions are legal, although gay marriages cannot be conducted in the city itself.
* Maine's governor signed a bill on May 6 that cleared the way for the legalization of gay marriage. The law is due to take effect in September, but it could be delayed or even voided if opponents gather enough support for a statewide referendum on gay marriage.
* The New York State Assembly passed a bill on May 12 to legalize gay marriage, but it faces an uncertain future in the state Senate, where Democrats hold a slim majority.
* A bill to authorize gay marriage in New Hampshire stalled unexpectedly on May 20 because of concessions to religious groups opposed to such unions. The bill has been sent to a committee where lawmakers from both legislative chambers will try to resolve their differences.
* Forty-two U.S. states have laws explicitly prohibiting such marriages, including 29 with constitutional amendments restricting marriage to one man and one woman, according to the Human Rights Campaign, a gay rights advocacy group.
* New Jersey permits same-sex civil unions that grant largely the same state rights as married couples -- from insurance coverage to tax benefits and hospital visiting rights -- but lack the full legal protections of marriage.
* Hawaii, California, Oregon and Washington offer gay couples some legal rights as partners.
* The patchwork of laws has caused some unusual complications. Rhode Island's top court, for example, ruled in December 2007 that a same-sex couple married in Massachusetts could not legally divorce in Rhode Island, saying the state's family court did not have authority over same-sex marriages.
* The U.S. Supreme Court has not taken a case on gay marriage, leaving states to decide the issue. But eight same-sex couples who married in Massachusetts and three gay widowers filed a lawsuit on March 3 seeking access to federal protections and programs granted to straight married couples.
Compiled by Jason Szep in Boston; Editing by Mohammad Zargham