Northern European countries were the first to recognise same-sex unions - a trend that picked up in the 1990s and eventually crossed the Atlantic.
Gay marriage has become an important political issue in the US
It became a polarising issue in the 2004 US elections, with voters in many states banning the practice.
The BBC News website looks at where same-sex unions have been given the go-ahead, and the often intense debates over them.
In a number of countries in Europe, the status of "registered partnership" has been established.
In 1989, Denmark became the first country to institute legislation granting registered same-sex partners the same rights as married couples. Church weddings are not allowed.
Norway, Sweden and Iceland all enacted similar legislation in 1996, and Finland followed suit six years later.
The Netherlands became the first country to offer full civil marriage rights to gay couples in 2001.
In neighbouring Belgium gay marriages were allowed in 2003.
Spain, too, legalised full marriage for gay couples in June 2005, despite fierce opposition from the Roman Catholic Church. Gay married couples can also adopt children.
Germany has allowed same-sex couples to register for "life partnerships" since 2001. The law only gives couples the same inheritance and tenants' rights as heterosexual married couples.
France in 1999 introduced a civil contract called the Pacs, which gives some rights to cohabiting couples, regardless of sex. These do not include the full rights of marriage, notably over taxes, inheritance and adoption. In 2004, a mayor conducted the country's first gay marriage, but it was later nullified by a court.
In Luxembourg, a law on civil partnerships largely inspired by the French model was introduced in 2004.
In Britain, legislation came into force in December 2005 giving same-sex couples in registered partnerships similar rights to married couples, in areas such as pensions, property, social security, and housing.
THE UNITED STATES
Many states have passed amendments to their constitutions defining marriage as the union of a man and a woman. Congress has failed to approve a similar amendment to the US constitution.
President George W Bush has made clear that he supports such an amendment but said that individual states would still be able to make their own arrangements on unions - which offer couples some of the same rights as marriage.
In 2000, Vermont became the first US state to offer homosexuals the right to join in civil unions, giving them the same benefits as married couples on matters such as life insurance, health care and child custody.
In April 2005, Connecticut became the second US state to allow same-sex civil unions - and the first to do so without orders from a court. But it specifically defined marriage as being the union of a man and a woman.
In California, San Francisco started issuing marriage licences to same-sex couples in February 2004, after the new mayor defied state law and allowed gay weddings. The move was later annulled by the state Supreme Court. But in March 2005 a San Francisco judge ruled that the law banning same-sex marriage was unconstitutional. In September 2005 a bill that would have legalised gay marriage was vetoed by California Governor Arnold Schwarzenegger.
Massachusetts became the first state to issue marriage licences for gay couples in May 2004. State legislators have proposed a constitutional amendment that would ban gay marriages, but would allow civil unions. If the proposal passes further legal hurdles, it will go to the voters in a referendum in autumn 2006.
In Oregon, officials in the Portland area began issuing marriage licenses to same-sex couples in 2004, before an amendment to the state constitution banning such weddings was approved by voters in November. But Governor Ted Kulongoski said he would back a new law which would allow gay couples to form civil unions.
In July 2005, a bill to legalise same-sex marriage became law. Gay marriage was already legal in eight of 10 provinces and one of Canada's three territories.
In July 2003 the first gay civil union took place, giving legal rights similar to those for heterosexual couples, but excluding adoption and inheritance rights. Argentina is the first country in Latin America to allow such unions.
In December, 2004, New Zealand's parliament passed controversial legislation to recognise civil unions between gay couples.
Although homosexuality remains a taboo subject in many African societies, South Africa is a liberal country in terms of gay rights.
The post-apartheid constitution includes a clause making discrimination based on sexual identity illegal. Homosexual couples are allowed to adopt.
In December 2005 South Africa's high court said it was unconstitutional to deny gay people the right to marry, and instructed parliament to amend marriage laws to include same-sex unions within a year.