7 Countries Where Anti-LGBTQ+ Laws Have Colonial Roots
From Ghana to Singapore, many laws criminalising gay people were written by British colonisers. Here is where they came from and what they still cost.
Photo: RainbowNews Editorial
When Ghana passed its harsh anti-LGBTQ+ law in 2024, politicians called it an African value. But legal historians pointed to something different. The core of the law traces back to the British Penal Code of 1860. That same code, written in London, was exported across the empire. Today it still shapes the lives of gay, lesbian, and bisexual people in dozens of countries. This list looks at seven nations where colonial-era laws still criminalise same-sex relations. It explains where each law came from, what it means in practice, and where change — or the resistance to it — stands today.
The Colonial Blueprint
Britain was not the only coloniser that left anti-LGBTQ+ laws behind. France, Spain, and Portugal also shaped legal systems across Africa, Asia, and the Americas. But the British Penal Code of 1860, drafted largely by Thomas Macaulay, was the most widely copied. It criminalised "carnal intercourse against the order of nature." That phrase became the legal foundation in over 30 countries. The irony is sharp. Many of those countries now defend these laws as tradition. The laws are, in fact, imports.
Understanding this history matters. It reframes the debate. LGBTQ+ rights are not a Western idea being forced on the Global South. In many cases, the criminalisation is the Western idea — one that was forced on local cultures centuries ago. Researchers at the Human Dignity Trust have documented this pattern extensively. Their findings show that most current criminal laws against same-sex relations in former British colonies derive directly from Macaulay's code.
Seven Countries, Seven Histories
1. Ghana
Ghana made international headlines when its parliament passed the Human Sexual Rights and Family Values Act. The law added heavy prison sentences on top of already existing colonial-era bans. Supporters called it a defence of Ghanaian culture. But pre-colonial Ghanaian societies, including several Akan peoples, had documented roles for gender-nonconforming individuals. The modern ban came with British rule in the 19th century. The new 2024 law goes further than anything the colonisers wrote. Ghana's Supreme Court is still reviewing a constitutional challenge to it.
2. Nigeria
Nigeria has two overlapping legal systems when it comes to same-sex relations. The colonial-era Same Sex Marriage Prohibition Act from 2014 built on earlier British Penal Code provisions. In the north, twelve states also apply Sharia law, which carries even harsher penalties. An estimated 200 million people live under laws that criminalise their identity. Human rights groups report that enforcement is inconsistent but real. Arrests, mob violence, and family-based detention are all documented. There is no significant political movement inside the country pushing for decriminalisation at this time.
3. Kenya
Kenya's Penal Code sections 162 and 165 ban "unnatural offences" and "indecent practices between males." Both sections come directly from British colonial legislation. In 2019, the High Court upheld these sections despite a challenge. The court argued that Kenyan society had not yet accepted change. That ruling disappointed activists and legal scholars alike. Kenya's LGBTQ+ community remains active, however. Court cases continue, and advocacy groups operate in Nairobi despite significant social pressure.
4. Singapore
Singapore formally repealed Section 377A of its Penal Code in 2022. That was a landmark moment. But the repeal came with a significant limit. Parliament also amended the constitution to protect the legal definition of marriage as being between a man and a woman. So while sex between men is no longer criminalised, same-sex couples have no legal recognition. Section 377A itself was written into Singapore's penal code by the British in 1938. It remained on the books for 84 years. The partial reform shows how deeply these laws embedded themselves — even when removed, their effects linger in the legal architecture.
5. India
India's story is one of the most discussed in this space. The Supreme Court decriminalised same-sex relations in 2018 by striking down Section 377 of the Indian Penal Code. That section had been introduced under British colonial rule in 1861. The 2018 ruling was a major victory. But marriage equality remains absent. In 2023, the Supreme Court declined to legalise same-sex marriage, leaving that decision to parliament. The government has shown no interest in moving forward. So India sits in a middle position: decriminalised but without equal rights. The colonial law is gone; its cultural shadow remains.
6. Jamaica
Jamaica regularly appears on lists of the most dangerous countries for gay and bisexual men. The Offences Against the Person Act includes a "buggery law" dating to British colonial rule. Penalties include up to ten years of hard labour. Enforcement is not always consistent, but social hostility is severe and well-documented. Several high-profile cases of violence against gay Jamaicans have drawn international attention. Activist Carole Narcisse and others have challenged the law in court. So far, those challenges have not succeeded. The government has consistently refused to repeal the law, often citing public opinion.
7. Senegal
Senegal criminalises "acts against nature" under Article 319 of its Penal Code. The article was introduced under French colonial rule. Penalties can reach five years in prison. In recent years, reports of arrests and mob violence have increased. LGBTQ+ Senegalese people have sought asylum in Europe, particularly in France. Paris-based groups have been working in solidarity with activists in Dakar. The situation highlights how colonial legal structures interact with current political pressures. Some Senegalese legal scholars argue for reform. Their voices, however, face strong opposition from religious and political leaders.
What This Means for the Broader Debate
The colonial origins of these laws do not automatically mean they will be repealed. Laws gain local support over time. Politicians use them for votes. Religious institutions defend them as moral anchors. That is the political reality. But the historical record still matters for how we discuss these issues.
When Western governments criticise anti-LGBTQ+ laws in Africa or Asia, the response is often that this is cultural imperialism. That argument has some weight in other contexts. Here, it does not hold. The criminalisation itself was an import. Decriminalisation would, in many cases, be a return — not an imposition.
Japan offers an interesting contrast. It was never colonised by Britain and has no colonial-era penal code banning same-sex relations. Its courts have recently moved toward recognising gender change without surgery. For more on those developments, see Japan Supreme Court to Rule on Same-Sex Marriage Ban. The contrast with colonised nations is striking.
Progress is also uneven within regions. Some countries have moved forward while neighbours have not. For a broader look at where legal shifts are happening right now, 7 Countries Where LGBTQ+ Rights Are Changing Fast in 2026 covers the full picture across continents.
The bottom line is uncomfortable but important. Many of the laws presented today as ancient cultural norms are, in legal terms, roughly 150 years old. They were written in European capitals and imposed on societies that had their own, often more varied, understandings of gender and sexuality. Acknowledging that history is not a solution. But it is a necessary starting point for any honest conversation about where these laws came from — and who they were really written for.
