In many parts of the world today, laws that criminalize LGBTQ+ people are often described as “traditional” or “cultural.” History tells a more complicated story.
A large share of these laws were not created locally. They were written in European capitals and imposed across colonial empires. The most influential example came from the British Empire, whose criminal codes spread across Asia, Africa, the Caribbean, and the Pacific during the nineteenth century. (hrw.org)
These colonial laws often outlived the empires that created them. Many remained in place after independence and still shape legal systems today.
Understanding this history matters because the debate over LGBTQ+ rights in many countries is often framed as a conflict between “Western values” and “local traditions.” In reality, some of the laws now used to justify persecution were themselves colonial imports.
The Victorian Origins of Anti‑Gay Criminal Law
Modern anti‑sodomy laws in many countries trace back to a single legal model introduced in British India in the nineteenth century.
In 1860, the British colonial government created the Indian Penal Code, drafted largely under the supervision of colonial administrator Thomas Babington Macaulay. One provision, Section 377, criminalized “carnal intercourse against the order of nature.” (en.wikipedia.org)
The wording was intentionally broad. It could be used to prosecute same‑sex intimacy and other forms of sexual activity that Victorian officials considered immoral.
Colonial administrators exported this law throughout the British Empire. Versions of Section 377 appeared across Asia, Africa, and the Pacific in the late nineteenth and early twentieth centuries. (hrw.org)
Even after independence, many countries kept these codes almost unchanged.
As a result, the legal geography of anti‑LGBTQ+ laws often maps directly onto the map of the British Empire.
Human Rights Watch notes that more than half of the countries that still criminalize same‑sex relationships inherited those laws from British colonial rule. (hrw.org)
Why Colonial Governments Created These Laws
The British did not simply copy existing local traditions. In many places they introduced stricter rules than had existed before.
Colonial administrators believed they were imposing European moral standards. Officials feared that colonial societies were “morally lax” and used law as a tool to enforce Victorian ideas about sexuality and gender. (hrw.org)
The laws also helped colonial governments control subject populations. Policing sexuality became another way to assert authority and define “civilized” behavior.
In some societies, historians have documented diverse gender roles and same‑sex relationships before colonial rule. While these practices varied widely, they were often regulated socially rather than criminalized in formal legal codes.
Colonial criminal law replaced that diversity with a rigid legal framework rooted in Christian morality.
Different Colonial Empires, Different Legal Legacies
The British Empire had the most enduring impact on anti‑LGBTQ+ laws, but other colonial powers also shaped legal systems.
French colonies present an interesting contrast. After the French Revolution, the French Penal Code of 1791 removed laws criminalizing consensual same‑sex relations. This decriminalized approach spread through the French Empire and Napoleonic legal systems. (tandfonline.com)
As a result, many former French colonies did not inherit the same criminal statutes.
Portuguese colonies followed a different pattern again. Several former Portuguese territories in Africa later removed colonial‑era morality laws in the late twentieth and early twenty‑first centuries. (news.trust.org)
The legal map of LGBTQ+ rights today therefore reflects centuries‑old imperial legal systems.
Where Colonial Laws Still Shape Modern Criminal Codes
The table below shows selected countries where anti‑LGBTQ+ laws have direct or widely documented colonial origins. It also notes recent reform efforts.
| Country | Colonial power | Colonial law introduced | Current legal status | Reform efforts |
|---|---|---|---|---|
| Malaysia | United Kingdom | Section 377‑style law introduced in British Malaya, 1871 | Same‑sex acts illegal; penalties include prison and caning | Ongoing legal and political debates about reform (en.wikipedia.org) |
| Pakistan | United Kingdom | Section 377 via Indian Penal Code, 1860s | Same‑sex relations criminalized | Some court rulings expanding rights for transgender people |
| Bangladesh | United Kingdom | Section 377 inherited from British India, 1860 | Same‑sex acts illegal | Growing civil society advocacy |
| Sri Lanka | United Kingdom | Colonial “unnatural offences” law retained after independence | Same‑sex acts criminalized though rarely enforced | Government discussions about repeal |
| Singapore | United Kingdom | Section 377A introduced in 1938 | Repealed in 2022 | Major legal reform after decades of debate (en.wikipedia.org) |
| Kenya | United Kingdom | Penal Code provisions derived from colonial law | Same‑sex acts illegal | Constitutional challenges filed in courts |
| Uganda | United Kingdom | Colonial sodomy provisions adopted into criminal code | Same‑sex acts illegal; severe penalties | Regional and international legal challenges |
| Nigeria | United Kingdom | Colonial anti‑sodomy laws retained | Same‑sex acts illegal nationwide | Activism and international pressure |
| Guyana | United Kingdom | Criminal Law (Offences) Act 1893 under British rule | Same‑sex acts criminalized | Court challenges and civil society campaigns (en.wikipedia.org) |
| Papua New Guinea | United Kingdom / Australia | Colonial penal code based on British law | Same‑sex acts illegal | Increasing advocacy for reform |
Colonial Law and Modern Politics
Colonial origins explain the existence of many anti‑LGBTQ+ laws. They do not fully explain why those laws persist.
After independence, national governments chose whether to keep or repeal colonial criminal codes. Some countries removed them quickly. Others retained them for decades.
Political leaders sometimes frame LGBTQ+ rights as foreign influence, even though the laws criminalizing same‑sex relationships were themselves introduced by colonial authorities.
Human Rights Watch has described this as a “strange afterlife of colonial law,” where legal systems built to control imperial subjects continue to shape modern debates over sexuality and rights. (hrw.org)
The Long Shadow of Empire
The global pattern is striking.
Former British colonies are statistically far more likely to retain laws criminalizing homosexuality than countries with other colonial histories. (washingtonpost.com)
In effect, nineteenth‑century Victorian morality still shapes twenty‑first‑century legal systems.
The result is one of the most enduring legacies of empire: a set of criminal codes that traveled across continents and still determine whether millions of people can live openly and safely today.













