Although anti-homosexuality laws date back to ancient and Biblical times, their prevalence until the latter half of the 20th Century was largely due to the British Empire, which was responsible for more than half of the 71 separate national criminalizations introduced. Decriminalization actually began in Andorra and France in 1791, spreading to the Netherlands, Brazil, Argentina, Mexico, Japan and Italy in the 1800s and to Peru, Denmark, Switzerland, and Sweden before 1945.
After the Second World War, homosexuality was legalized in Greece (1951), Thailand (1956), Hungary (1961), Czechoslovakia (1962) and England and Wales (1967). Illinois became the first US state to decriminalize it in 1962, with the whole nation following in 2003.
Decriminalizing homosexuality was an important step on the way to full equality of sexual orientation; achieving the legal right to marry a person regardless of their gender took equality to a new level of positive affirmation.
Similarly, same-sex marriage can be dated back to the first century AD. But in the modern era, the Netherlands was the first country to pass national legislation enshrining in law the right to same-sex marriage in 2001. Five years later, Mexico City became the first city in Latin America to legalize it. Gay marriage is now available in 29 countries. America’s first legal same-sex marriage took place in San Francisco in 2004, with the Supreme Court legalizing it throughout the country in 2015.
There remain controversies around the rights of transgendered people even in the most progressive nations, while some religiously conservative countries continue to outlaw homosexuality, especially in parts of Africa. But in recent years the momentum behind equality of sexual identification and orientation has started to seem unstoppable.