Thirty years after the first-ever gay civil unions in Denmark, same-sex marriages are today allowed in 28 countries, but homosexuality remains illegal in some parts of the world.
After the liberalisation of same sex marriage came into force in Northern Ireland on Monday, 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 (although originally not Northern Ireland), Finland, France, Germany, Iceland, Ireland, Luxembourg, Malta, Norway, Portugal, Spain and Sweden.
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.