Out of the 54 countries recognised by the African Union, a few countries enforce some of the toughest punishments for homosexuality, reflecting strong legal, cultural, and religious opposition in many parts of the continent.
In several states the punishment ranges from short prison terms to life imprisonment or even the death penalty.
1. Mauritania – Death Penalty
Mauritania enforces one of the harshest anti-homosexuality laws in Africa. Under the country’s interpretation of Islamic law, sexual relations between men can carry the death penalty.
Although executions for this offence remain extremely rare, the law still stands and continues to attract international criticism from human rights organisations. The legislation reflects the country’s conservative religious and cultural environment, where same-sex relationships remain socially unacceptable.
2.Somalia – Death Penalty
Somalia criminalises homosexuality under both national law and interpretations of Islamic law used in certain regions. In areas controlled by militant groups or strict religious courts, individuals accused of same-sex relations may face the death penalty.
3. Uganda – Death Penalty
Uganda introduced one of the world’s toughest anti-LGBTQ laws when President Yoweri Museveni signed the Anti-Homosexuality Act. The legislation allows the death penalty for “aggravated homosexuality,” a broad category that includes repeat offences or sexual relations involving someone who is HIV-positive.
The law also bans the “promotion of homosexuality,” meaning anyone who publicly advocates LGBTQ rights or financially supports related organisations can face up to twenty years in prison.
4. Gambia – Life Imprisonment
The Gambia imposes life imprisonment for what it describes as “aggravated homosexuality.” Authorities introduced the provision in 2014 as part of a broader crackdown on LGBTQ activities.
The law targets cases involving repeat offences, same-sex relations involving minors, or situations where one partner is HIV positive.
Even after political changes in the country, the legislation remains in force. Advocacy groups continue to call for reform, arguing that the law encourages discrimination and social hostility.
5. Sierra Leone – Life Imprisonment
Sierra Leone maintains colonial-era laws that criminalise same-sex relations. The legislation allows courts to impose life imprisonment for certain offences involving same-sex intimacy.
Although prosecutions remain uncommon, activists argue that the law fuels stigma and discourages open discussion about LGBTQ rights.
6. Sudan – Life Imprisonment
Sudan’s legal system previously included the death penalty for repeated homosexual offences. Legal reforms removed that provision, but the law still allows life imprisonment for certain cases involving same-sex relations.

7. Zambia – Life Imprisonment
Zambia’s penal code criminalises same-sex intimacy and allows courts to impose life imprisonment. The law reflects strong religious and cultural opposition to homosexuality in the country.
8. Tanzania – Life Imprisonment
Tanzania enforces strict anti-homosexuality laws that allow life imprisonment for certain offences. Authorities have also cracked down on LGBTQ advocacy groups, arguing that such activities contradict national values.
SEE ALSO: Ghana Legalizes Cannabis: See the Countries Where Weed Is Legal
9. Ethiopia – Fifteen Years
Ethiopia’s penal code prohibits same-sex relations and allows prison sentences of up to fifteen years depending on the circumstances. Social attitudes remain strongly conservative.
10.Kenya – Fourteen Years
Kenya criminalises same-sex relations under colonial-era laws that remain part of the penal code. Individuals convicted of homosexual acts can receive up to fourteen years in prison.
11. Malawi – Fourteen Years
Malawi punishes same-sex relations with prison sentences of up to fourteen years. Although activists continue to push for reform, the legislation remains in force.
12.Nigeria – Up to 14 Years in Prison
Nigeria enforces strict laws against same-sex relationships. Under federal legislation, individuals convicted of homosexual acts can face up to 14 years in prison.
In addition, twelve northern states that apply Sharia law allow the death penalty for same-sex relations between men. The country also bans same-sex marriage and prohibits organisations that support LGBTQ rights.
These laws remain among the toughest on the African continent and continue to generate debate both domestically and internationally.
ALSO READ: Hilary’s Death and The Cost of Being Gay in Nigeria
13. Senegal – Up to Ten Years in Prison
Senegal has recently moved to strengthen its anti-homosexuality laws. Lawmakers approved a bill that increases the prison sentence for same-sex relations from one to five years to a tougher penalty of five to ten years.
Prime Minister Ousmane Sonko, who introduced the bill, argued that homosexual acts contradict the nation’s cultural and religious values and described them as “against nature.” The legislation received overwhelming support in parliament, with almost all lawmakers voting in favour. Once the president signs it into law, the stricter penalties will come into force.
The move reflects growing political pressure within Senegal to maintain conservative social policies despite criticism from international human-rights groups.
14.South Sudan – Ten Years
South Sudan inherited colonial-era laws that criminalise same-sex relationships. The maximum penalty for homosexual acts can reach ten years in prison.
15. Eritrea – Up to Seven Years
Eritrea criminalises homosexual acts under its penal code. Anyone convicted may receive up to seven years in prison, and authorities rarely tolerate open discussion of LGBTQ issues.