Countries where it is illegal to be homosexual
Country Rights | Hanky Codes | LGBTQ+ Flags | Slang dictionary | UK Gay & Lesbian History
Here we list countries where, at the time of writing (October 2023), it is illegal to be gay or lesbian. It is a complex patchwork of different laws and penalties in different countries. Some of these countries turn a blind eye, if it’s kept discrete and out of the way, while others will execute you for any homosexual behaviour. One view is that the British Empire ‘exported’ the criminalisation of homosexuality around the world in the last couple of centuries; paradoxically, the UK has often led the world in LGBTQ rights in modern times.

Background
As the British Empire expanded around the world in the 18th and 19th centuries, a time when much of the West criminalised homosexuality in some form, it exported its own penal
laws to its colonies. Some point out that before colonisation there was little or no persecution in Africa because of a person’s sexual orientation nor any criminalisation of
homosexuality; the picture was not so simple: for example, this view ignores Islamic Sharia Law, which prohibits homosexuality, and other informal or non-legal customs
which have been enforced in parts of Africa for centuries, especially in its northern regions. Nevertheless, while the UK has since repealed its own homosexual criminalisation
laws, beginning in 1967, many of its former colonies which inherited these laws did not repeal them after gaining independence, mainly in the decades after WWII.
Today, many countries in the modern Commonwealth, an association of sovereign states who are mainly but not exclusively former British colonies, still criminalise homosexuality to varying degrees. Today 29 out of 53 Commonwealth countries still outlaw homosexuality. As mentioned, these range from countries where homosexuality is criminalised but the laws are not enforced, to countries which punish with prison terms to countries where the death penalty is law but rarely enforced and some where capital punishment is actually used.
Countries
The table below shows you a table of all the countries where it is against the law to engage in homosexual activity.
Countries which are or have been in the Commonwealth are denoted by the Commonwealth’s blue flag .
Some former British administered territories, where there are still penalties for homosexuality never joined the Commonwealth, notably countries in the Middle East and
North Africa such as Sudan and Somalia. These countries often have harsh penalties and remain in place today. Some countries take different positions on whether
lesbianism is criminalised alongside male homosexuality.
Not enforced
AsiaIndonesia (legal in some areas)
Sri Lanka
Eswatini
Malawi
Namibia
Sierra Leone
Dominica
Grenada
Guyana
Jamaica
Saint Lucia
Saint Vincent
Kiribati
Niue (NZ)
Papua New Guinea
Samoa
Solomon Islands
Tonga
Tuvalu
Imprisonment and/or physical punishment
AfricaCameroon
Eritrea
Ethiopia
Gambia
Ghana
Kenya
Liberia
Libya
Mauritania
Morocco
Nigeria (South)
Senegal
South Sudan
Sudan
Tanzania
Togo
Tunisia
Uganda
Zambia
Zimbabwe
Bangladesh
Egypt
Kuwait
Lebanon
Malaysia
Maldives
Myanmar
Oman
Pakistan
Saudi Arabia
Syria
Turkmenistan
Uzbekistan
Death penalty
AfricaNigeria (North)
Somalia (possible)
Uganda
Afghanistan
Brunei (Not enforced)
Iran
Iraq
Qatar (possible)
United Arab Emirates (possible)
Yemen
For further reading we recommend the Equaldex map
(then click the ‘homosexuality tab’) which monitors these laws around the world.
Also How Britain’s exported homophobia continues to drive health inequalities amongst LGBTQI communities,
written in April 2019.