Same-sex marriage now legal in 30 countries
Same-sex marriage, which Switzerland approved in a referendum on Sunday, is now legal in 30 countries, but homosexuality remains banned in many parts of the world.
Here is an overview of the global situation.
On October 1, 1989, for the first time in the world, several gay couples in Denmark tied the knot in legal civil unions.
Danish homosexual couples would, however, have to wait until 2012 to be allowed to marry in church.
The right to a religious marriage ceremony was first allowed in the Netherlands in 2001.
Thirteen European countries followed: Belgium, Britain, Finland, France, Germany, Iceland, Ireland, Luxembourg, Malta, Norway, Portugal, Spain and Sweden.
Austria allowed gay marriage from 2019.
In Switzerland, same-sex couples could only register a civil partnership until the parliament approved marriage late last year.
Opponents launched a referendum against the decision under Switzerland's direct democracy system, only to be defeated by Sunday's vote, in which 64 percent backed same-sex marriage.
Some countries allow only civil partnerships for gays, including Croatia, Cyprus, the Czech Republic, Greece, Hungary, Italy and Switzerland.
The Czech government has backed draft legislation that would make the country the first post-communist member of the European Union to legalise same-sex marriage, but its fate is uncertain.
Slovenia also allows civil partnerships but in 2015 rejected in a referendum a proposal to legalise gay marriage.
In 2014 Estonia became the first former Soviet republic to authorise same-sex civil unions.
In Romania a referendum aimed at enshrining a ban on gay marriage in the constitution failed in 2018 because of a low turnout.
Canada was the first American country to authorise same-sex marriage in 2005.
In 2015 the US Supreme Court legalised gay marriage nationwide at a time when it was banned in 14 out of 50 states.
However the United States' first gay marriage actually took place in 1971, when a Minnesota couple obtained a marriage licence thanks to an overlooked legal loophole. The marriage was officially recognised in March 2019, after a five-decade legal battle.
In Latin America six countries allow same-sex marriages: Argentina, Brazil, Colombia, Ecuador, Uruguay and Costa Rica.
Mexico's federal capital authorised gay civil unions in 2007 and marriages in 2009. Half of its 32 states have followed.
Chile legalised gay civil unions in 2015.
Cuba left out of its new constitution adopted in 2019 changes that would have paved the way for legal same-sex marriage. In 2021, a draft of a new family code opened the door to same-sex marriage, but it will be put to a referendum.
While much of Asia is tolerant of homosexuality, Taiwan became in May 2019 the first in the region to allow gay marriage.
In Japan, a court in northern Sapporo ruled in 2021 that the country's failure to recognise same-sex marriage is unconstitutional, in a landmark first verdict on the issue.
Australia (2017) and New Zealand (2013) are the only places in the wider Asia-Pacific region to have passed gay marriage laws.
In the Middle East, where homosexuality is repressed, Israel leads the way in terms of gay rights, recognising same-sex marriages that are sealed elsewhere although not allowing such unions in the country itself.
Several countries in the conservative region still have the death penalty for homosexuality, including Saudi Arabia and the United Arab Emirates.
South Africa is the sole nation on the African continent to allow gay marriage, which it legalised in 2006.
Around 30 African countries ban homosexuality, with Mauritania, Somalia and Sudan having the death penalty for same-sex relations.