Rights affecting lesbian, gay, bisexual, and transgender (LGBT) people vary greatly by country or jurisdiction—encompassing everything from the legal recognition of same-sex marriage to the death penalty for homosexuality.
Notably, , 35 countries recognize same-sex marriage. By contrast, not counting non-state actors and extrajudicial killings, only two countries are believed to impose the death penalty on consensual same-sex sexual acts: Iran and Afghanistan. The death penalty is officially law, but generally not practiced, in Mauritania, Saudi Arabia, Somalia (in the autonomous state of Jubaland) and the United Arab Emirates. As well as, LGBT people face extrajudicial killings in the Russian region of Chechnya. Sudan rescinded its unenforced death penalty for anal sex (hetero- or homosexual) in 2020. Fifteen countries have stoning on the books as a penalty for adultery, which (in light of the illegality of gay marriage in those countries) would by default include gay sex, but this is enforced by the legal authorities in Iran and Nigeria (in the northern third of the country).
In 2011, the United Nations Human Rights Council passed its first resolution recognizing LGBT rights, following which the Office of the United Nations High Commissioner for Human Rights issued a report documenting violations of the rights of LGBT people, including hate crimes, criminalization of homosexual activity, and discrimination. Following the issuance of the report, the United Nations urged all countries which had not yet done so to enact laws protecting basic LGBT rights. A 2022 study found that LGBT rights (as measured by ILGA-Europe's Rainbow Index) were correlated with less HIV/AIDS incidence among gay and bisexual men independently of risky sexual behavior.
The 2023 Equaldex Equality Index ranks the Nordics, Uruguay, Canada, the Netherlands, Spain, the United Kingdom, and the United States among the best for LGBT rights. The index ranks Yemen, Brunei, Afghanistan, Somalia, Mauritania, Palestine, and Iran among the worst.