(Reuters) - The following is a look at laws on gay marriage and same-sex civil unions in the United States.
* 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’s Supreme Court backed a ban on gay marriage on May 26, upholding a voter-approved proposition defining marriage as between a man and a woman, but said the marriages last year of 18,000 same-sex couples were still legal.
* 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 legislative 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 a leadership struggle has deadlocked the body.
* New Hampshire on June 3 became the sixth U.S. state to authorize gay marriage after its Democratic-controlled House of Representatives endorsed gay marriage, hours after the state Senate approved the legislation along party lines. Governor John Lynch, a Democrat, signed the bill, which goes into effect on January 1.
* 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.
Compiled by Jason Szep in Boston and Edith Honan in New York; editing by Todd Eastham