After the Supreme Court of India decriminalized gay sex on Thursday, here is a general description of the situation around the world:
Africa: mostly a crime
Around 30 African countries ban homosexuality, and Mauritania, Somalia and Sudan have the death penalty for same-sex relationships.
Gay sex is decriminalized in only a few countries: Chad, the Democratic Republic of the Congo, Gabon, Cote d'Ivoire, Mali and Mozambique.
South Africa is an exception, being the only nation on the continent that allows gay marriage, which was legalized in 2006.
It also allows for adoption, medically assisted procreation and subrogation for homosexuals.
Middle East: repressed
Several countries in the conservative region still provide for the death penalty for homosexuality, including Saudi Arabia and the United Arab Emirates.
Israel leads the way in terms of the rights of homosexuals, recognizing same-sex marriages that take place elsewhere, although it does not allow such unions in the country. Homosexual couples can adopt children.
There were mass demonstrations in Jerusalem and Tel Aviv in July to protest a law that denies rights of subrogation to same-sex couples.
Lebanon is also more tolerant than other Arab countries.
Advance in Asia
Much of Asia is tolerant of homosexuality, and the remaining taboos are gradually eroding even in Vietnam and Nepal.
Taiwan will become the first place in the region to allow homosexual marriage after the highest court ruled in May 2017 that preventing same-sex unions was unconstitutional and gave the authorities two years to legalize them.
The main court in the Philippines in June began to hear arguments for the legalization of gay marriage.
In China, homosexuality was classified as a mental illness until 2001 and a crime until 1997. Conservative attitudes and discrimination remain widespread.
Homosexuality is prohibited by Muslim countries in the region, such as Bangladesh, Malaysia and Pakistan, where they are punished with imprisonment or caning.
Europe: pioneers of gay marriage
In 2001, the Netherlands became the first country in the world to allow gay and lesbian couples to marry in a civil ceremony.
Fifteen European countries have followed it, including Britain, though not Northern Ireland, France and Germany, and Austria will join next year.
In 2014, Estonia became the first former Soviet republic to authorize civil unions between people of the same sex, which are rejected by Eastern European countries.
In Russia, homosexuality was considered a crime until 1993 and a mental illness until 1999. A 2013 law punishes the promotion of homosexuality among minors.
Several countries in Western Europe also allow same-sex couples to adopt children and 10 allow physician-assisted procreation for lesbian couples.
Progress in the Americas
Canada authorized same-sex marriage and adoptions in 2005, and 10 years later the United States legalized homosexual marriage nationwide.
The federal capital of Mexico was the pioneer in Latin America, allowing homosexual civil unions in 2007 and marriages in 2009, as well as adoption.
Same-sex marriages and adoptions are also legal in Argentina, Brazil, Colombia and Uruguay.
Cuba plans a referendum on the legalization of same-sex marriage by February 2019.