It's been decades since Ghana gained independence from the British Empire, setting off a chain reaction on a continent where dozens of countries struggled under the weight of European rule.
But while British colonialism may seem like a hallmark of the past, its legal and cultural legacies remain deeply embedded in the present. Colonial-era anti-LGBTQI+ laws continue to shape legal systems and public attitudes, disproportionately impacting Black LGBTQI+ people across Africa and the global diaspora.
In recent years, attacks against queer, trans, and gender nonconforming individuals have intensified alongside a broader global political shift to the far right, emboldening politicians to embrace and champion the backsliding of LGBTQI+ rights. Today, more than 60 UN member states criminalize consensual same-sex intimacy worldwide. Around half of such nations reside in Africa, with similar laws enforced across parts of the Middle East and Caribbean.
Read More: The Anti-Homosexuality Act Now: The Path Forward for LGBTQI+ Rights in Uganda
The erosion of LGBTQI+ rights is rooted in a growing number of punitive laws: Uganda’s 2023 Anti-Homosexuality Act, one of the most extreme pieces of anti-LGBTQI+ legislation in the world, imposes life imprisonment for consensual same-sex relations. Nigeria’s Same-Sex Marriage Prohibition Act, passed a decade earlier, goes beyond just banning marriage equality. The law also prohibits same-sex public displays of affection and criminalizes LGBTQI+ organizations and gatherings. And across the continent in Kenya, same-sex intimacy between men is subject to up to 14 years in prison.
In each of these instances, the criminalization of LGBTQI+ people can be traced back to anti-LGBTQI+ laws imposed by Britain. Some experts argue, however, that some countries have since expanded and intensified those provisions.
“What we are witnessing today goes far beyond colonial legacy,” says Dennis Wamala, a Program Officer at Rainbow Railroad, who fled Uganda and relocated to Canada with the organization’s support.
Read More: ‘Silence Was Not Survival’: How Dennis Turned His Story into Action
“In countries such as Uganda, these laws have been deliberately expanded and weaponized under the influence of religious extremism and political opportunism. The result is legislation that is not only more punitive than the original colonial statutes, but openly inhumane,” he adds. “This is not about protecting culture or morality, it is about using LGBTQI+ people as political scapegoats to mobilize fear, distract from governance failures, and consolidate power.”
A history of colonial anti-LGBTQI+ laws
Homosexuality was first codified as a civil crime in Britain following King Henry VIII’s passage of the Buggery Act of 1533, which made sexual relations between two men punishable by death. The law, which described same-sex sexual relations as “detestable and abominable,” remained in place in some way or another in England and Wales until 1967.
In the centuries following the passage of the act, negative attitudes towards homosexuality remained dominant in society, with little movement towards equality. By the late 1800s, as several European nations, and particularly Britain, moved to take control over the African continent, such beliefs of queerness were imposed on African colonies under the British Criminal Code Act of 1916. The law criminalized "carnal knowledge against the order of nature," similar to the 1862 Indian Penal Code—used in the then-British colony of India—which also criminalized same-sex intimacy.
The impact of British anti-LGBTQI+ laws
The new laws imposed on African colonies marked a significant shift from a range of societal norms, where homosexuality was not consistently treated as a crime and, in some societies, was accepted within social life. While conservative voices today may promote anti-gay laws to protect traditional “African family values,” with Ugandan President Yoweri Museveni calling homosexuality a “deviation” and asking lawmakers to resist “imperialist” pressure, research indicates that there were no policies outlawing homosexuality in Africa prior to colonization. Nevertheless, the influence of modern-day religious and Evangelical movements, and their homophobic nature, has become common all across Africa, as it's also been embraced as a popular political tactic to earn support from voters.
The consequences are tangible. Uganda currently ranks third in the list of countries where Rainbow Railroad receives the most requests for help. Since the passage of the Anti-Homosexuality Act in March 2023, Rainbow Railroad has received more than 3,400 requests for help.
That's not to say that LGBTQI+ equality has not made strides among some former colonies. South Africa became the first country on the continent to legalize same-sex marriage in 2006, ahead of England and New Zealand. The state functions as a pioneer in the region despite current challenges impacting queer, trans, and gender nonconforming refugees who flee to the country from other nearby regions.
In June 2024, the Namibian High Court decriminalized same-sex relations—reversing a colonial-era law inherited from South Africa. A year earlier, the court recognized some civil unions between same-sex couples conducted abroad. That advancement came with swift backlash: In 2025, Namibian President Nangolo Mbumba passed a bill to block recognition of same-sex marriage, likely in response to negative cultural attitudes towards queer, trans, and gender nonconforming individuals.
Elsewhere, similar tensions continue to unfold. The Kenyan Court of Appeals last year adjourned constitutional challenges to their existing penal code, which criminalizes same-sex actions. Earlier, the state considered Family Protection Bill 2023, which would expand current penalties for same-sex intimacy and further prohibit homosexuality, same-sex marriage, gender-affirming care procedures, and more. More than 2,200 requests for help from Kenya have been recorded from 2020 to 2025, with a near 200% increase from 2022 to 2023.
Looking ahead
The legacy of colonialism continues to shape the legal and social realities facing Black LGBTQI+ people today. But it does not define the future. Across Africa and the global diaspora, activists, community leaders, and advocates are challenging inherited laws, reclaiming histories, and building movements grounded in dignity, care, and self-determination.
Progress is often uneven, and frequently met with resistance, but it is undeniable. Court victories, community organizing, and international solidarity are opening new pathways towards safety.
The work ahead remains urgent. Dismantling colonial-era legal systems, confronting political opportunism, and addressing deep-rooted stigma will require sustained commitment. The story is still being written, not only in courtrooms and legislatures, but in the everyday courage of people refusing to disappear. And in that collective resistance lies a powerful truth: change is not only possible, it is already underway.
