The first-ever gay civil unions in Denmark 30 years ago paved the way for full same-sex marriages that are today allowed in 28 countries, even though homosexuality remains illegal in some parts of the world.
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 (although not Northern Ireland), Finland, France, Germany, Iceland, Ireland, Luxembourg, Malta, Norway, Portugal, Spain and Sweden.
Austria allowed gay marriage from 2019
Some countries allow only gay civil partnerships 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.
Progress in North America
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.
The United States' first gay marriage had actually taken 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.
Mexico's federal capital authorised gay civil unions in 2007 and marriages in 2009. Half of its 32 states have followed.
Central and South America follow suit
In Latin America five countries allow same-sex marriages: Argentina, Brazil, Colombia and Uruguay, joined by Ecuador in June 2019.
Chile legalised gay civil unions in 2015.
Costa Rica's Supreme Court in 2018 ruled that a ban on same-sex marriages was unconstitutional and gave parliament 18 months to amend the laws.
Cuba left out of its new constitution adopted in February 2019 changes that would have paved the way for legal same-sex marriage. The definition of marriage will be left to a new Family Code which will be put to a referendum.
Taiwan, first in Asia
While much of Asia is tolerant of homosexuality, Taiwan became in May 2019 the first in the region to allow gay marriage.
In the Middle East, where homosexuality is repressed, Israel leads the way in terms of gay rights, recognising same-sex marriages that are performed 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.
Australia (2017) and New Zealand (2013) are the only places in the wider Asia-Pacific region to have passed gay marriage laws.
Africa: marriage in one country
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.