In 1993, Guinea Bissau repealed its Penal Code and decriminalised consensual same-sex sexual acts between adults. Since then, the number of African countries that have legalised same sex relations has grown to 22. Of these 22 nations, South Africa is the only country that has legalized same-sex marriage as well as allows for same sex couples to adopt children. It is also the only state whose constitution explicitly protects against discrimination based on sexual orientation.
The remaining 34 countries have legislated against homosexuality with penalties ranging from fines, corporal punishment, prison terms of varying lengths, and death penalties in countries such as Mauritania, Nigeria (in the 12 states where sharia law applies), Somalia, and South Sudan. The rate of enforcement of said laws is however highest and most aggressive in Cameroon according to Human Rights Watch.
For the majority of Africa nations, the anti-homosexuality laws are largely a holdover from colonial-era laws. And a lot more former British colonies have laws that criminalise homosexual conduct than former colonies of other European powers. Currently, all former Portuguese colonies have decriminalised same-sex relations – Angola being the latest in 2019.
When the British Empire was introducing legal systems around the world, one of the laws they included in the criminal statutes was the law against sodomy. This is codified in the Penal Codes of the respective countries. These Penal Codes are offshoots of the Indian Penal Code (IPC) drawn up by British historian Lord Thomas Babington Macaulay and enacted on 1 January 1862.
Until 2018 when India decriminalised homosexuality, Section 377 of its Penal Code criminalised “carnal intercourse against the order of nature with any man, woman or animal” and the offence was punishable with imprisonment up to life. The prohibition which was then replicated in other colonies was an extension of the law that criminalised buggery in England in 1533.
During the reign of King Henry VIII the ‘Acte for the punishment of the vice of Buggerie’ (Buggery Act) was introduced into law. The act prohibited “the detestable and abominable offence” of buggery (anal intercourse) committed with mankind or beast. Convictions under the Buggery Act were punishable by death. While anyone could technically be convicted under the act, male convictions were the most common.
In 1828, the Buggery Act was repealed and replaced by the Offences Against the Person Act. Unlike the Buggery Act that had applied to men and women collectively, the new law narrowed its focus solely on men having sex with men. It however maintained the death penalty as the punishment. This remained so until 1861 when the act was replaced by the Offences Against the Person Act of 1861 that abolished the death penalty for acts of sodomy instead making the act punishable by life imprisonment or hard labour ‘for any term not less than ten years.