I have heard that many African countries' anti-LGBTQ+ are products of European colonial governments, not necessarily the local cultures. For example, when Botswana's High Court overturned the country's anti-LGBTQ+ laws in 2019, the judge criticized the law in this way:
On Tuesday, Judge Leburu referred to Botswana’s anti-sodomy laws as a “British import,” adding that they had been developed “without consultation of local peoples.”
Of course, I realize we cannot generalize about a continent as large and diverse Africa, but I am casting a wide net for whatever information there might be on this topic.
Thanks.
what do we know about (what we would today refer to as) LGBTQ+ individuals and communities in pre-colonial Africa communities.
This is one of those questions where it is critical to remind ourselves that Africa is an incredibly diverse and complex continent with a multitude of cultures and societies, so we really can't speak of a broad "African" attitude or understanding of sexuality but instead must contextualize it into a particular local and temporal space.
With that said, the study of sexuality in pre and post colonial Africa has been a very hot topic in both history and anthropology. Researchers have tried to prove or disprove existence of homosexuality in pre and post colonial Africa to connect it with the social situation of contemporary gays and lesbians on the continent. One of the most well known books on this is Heterosexual Africa?: The History of an Idea from the Age of Exploration to the Age of AIDS by Marc Epprecht where he examines same-sex practices in Southern Africa, and Hungochani: The History of a Dissident Sexuality in Southern Africa also by Marc Epprecht. Another well known book is Boy-Wives and Female Husbands: Studies in African Homosexualities by Stephen O. Murray, Will Roscoe, and Marc Epprecht.
The issue when we talk about sexualities in Other places or times is that these sexualities might not map onto our contemporary understating of Euro-American "LGBTQ+" sexuality. Joseph Massad, has argued that in the case of the Middle East, people didn't have the concept of the "gay/straight binary," and didn't even have a concept of sexuality itself. This will be very important to remember when we talk of sexuality in pre-colonial Africa. Even though people might have been engaging in same-sex practices, it didn't necessarily look like contemporary practices of Euro-American LGBTQ+ homonormativity.
An example is mine marriages that occurred in colonial South Africa. The mines that were developed brought male workers from all across South Africa. These men often took on "wives" that were younger men and boys who had also come to the camps. These "wives" filled domestic (and sexual) roles for the miners. What we see when we look at these is that these marriages were divided not so much on sexuality, but on gender. The "wives" took on female roles. There were clear gendered differences between the two people. What this tells is that an understanding of sexuality cannot go without an understanding of gender as well. To make it even more complicated once a mine "wife" grew older they would get their own mine "wife" or engage in heterosexual relationships instead. In may cases these practices were just as much about gender as they were about sexuality. These mine marriages were an extension of same-sex practices in Southern Africa where men who were traditionally masculine and took the active role in sex were understood as still being heterosexual and "normal," and it was only the usually effeminate and passive partner that was seen as different.
Another example comes from the Azande people in Sudan. In pre-colonial times it appears that the Azande extensively practiced homosexuality amongst their soldiers and young men. This was response to both extensive time away from home while on military campaigns and an inability to marry young in Azande society. Older unmarried men would "marry" younger men and boys and these young men and boys would serve as "wives" in a sexual capacity for their "husbands." The "wives" were understood to be as women even though they were biologically male. These marriages though were only temporary though, and many of the older men only engaged in these marriages until they were able to marry women and the "wife" would himself go on to have a heterosexual marriage. Heterosexual unions were still seen as the most normal and desirable.
What European colonialism brought with them was not only economic dominance but also social and political dominance. Part of the European colonial project was to "domesticate" the indigenous people to European ideas of normalcy and respectability, which include heteronormative ideas of gender and sexuality. Since Europeans dominated these places socially and politically, indigenous people who wanted to win favor with their colonizers had to appeal to their colonizer's ideas of normalcy and respectability. Because Europeans largely saw homosexuality as some sort of moral and social degeneracy, indigenous people had to either denounce homosexuality in their own communities, or say that homosexuality didn't exist to garner approval from their colonizers. These homophobic ideas and norms stayed with people even after independence so we have the situation we have now throughout much of the continent.
References:
Epprecht, M. (2010). Heterosexual Africa? the history of an idea from the age of exploration to the age of AIDS. Ohio Univ. Press.
Epprecht, M. (2014). Hungochani: The History of a Dissident Sexuality in Southern Africa. McGill-Queen's University Press.
Evans-Pritchard, E. E. (1970). Sexual Inversion among the Azande. American Anthropologist, 72(6), 1428-1434. doi:10.1525/aa.1970.72.6.02a00170
Gaudio, R. P. (2011). Allah made us: Sexual outlaws in an Islamic African city. Wiley-Blackwell.
Massad, J. A. (2007). Desiring Arabs. University of Chicago Press.
McClintock, A. (2015). Imperial leather race, gender and sexuality in the colonial contest. Routledge.
Murray, S. O., Roscoe, W., & Epprecht, M. (2021). Boy-wives and female husbands: Studies in African homosexualities. State University of New York Press.
I notice the current top comment focuses on African socio-cultural attitudes towards LGBTQ+, rather than laws per se, so I'll try and chip in with two legal case studies.
The first is Kenya, which continues to criminalise homosexual acts between males (even with consent): s 162 of the Kenyan Penal Code. This has been subject to numerous legal challenges in the Kenyan courts, including EG & 7 others v Attorney General, which among other things challenged the law's lack of clarity, arbitrariness, and incompatibility with the Kenyan constitution. The challenge failed, but what is interesting are the strands of argument raised by counsel, including the observation that s 162 of the Penal Code was a colonial remnant: see para 112 and 194 of the judgment.
At para 214 of the judgment, counsel for one of the amicus curiae submitted that s 162 was specifically taken from s 377 of the Indian Penal Code (enacted by the British), which seems to be corroborated by this paper which quotes the then Chief Justice of Nyasaland and Rhodesia in 1925 as saying of his Kenyan colleagues (at page 18):
It seems clear... that the judiciary in Kenya is opposed to any considerable departure from the Indian Penal Code as there applied and I have no doubt from my experience in Uganda that the judges of that protectorate will take the same view...
It is equally clear that s 377 of the Indian Penal Code that criminalises gay sex has colonial origins. In the Indian Supreme Court case that struck down s 377 in India (and thus decriminalised gay sex), a brief history of the provision is laid out in the speech of Dr Dhananjaya Y Chandrachud J, beginning at paragraph 14 (page 275 of the pdf). His Honour discusses the "inquiry into the colonial origins of Section 377" and mentions that Lord Thomas Babington Macaulay, the "principal architect" of the Indian Penal Code, was influenced by historical common law sources and "Judeo-Christian morality".
So for Kenya, the conclusion is that the modern anti-LGBT laws are directly taken from colonial-era anti-LGBT laws that were heavily influenced by (or taken from) the Indian Penal Code, another colonial creation. However, where England decriminalised homosexuality following the Wolfenden Report in the 1960s, many ex-colonies did not (or took many decades to do so).
A more interesting question is: did pre-colonial laws in Africa similarly criminalise LGBTQ+ acts? I hope a more learned responder than I will jump in -- it has been very challenging trying to do research on pre-colonial laws, a lot of which is customary and by its nature undocumented.
According to page 70 of Banana v State, a failed Zimbabwean legal challenge to its own colonial-era anti-LGBTQ+ laws, there is a passage in Goldin and Gelfand's African law and custom in Rhodesia that states:
kurara nemumwe murume (homosexuality) is called huroyi. This is considered extremely wicked but is rare.
This is the only evidence of customary law that I can find. (If someone is really interested I suppose I could get the Oxford librarians to help me dig up the hardcopy of that book, which was published in 1975 and is rather hard to find.)
Sources (all hyperlinked above):
H.F. Morris, "A History of the Adoption of Codes of Criminal Law and Procedure in British Colonial Africa, 1876-1935" (1974) 18(1) Journal of African Law 6
Bennie Goldin and Michael Gelfand, African Law and Custom in Rhodesia (Juta, Cape Town 1975)
EG & 7 others v Attorney General; DKM & 9 others (Interested Parties); Katiba Institute & another (Amicus Curiae)., 184 (High Court.2019)
Banana v State [2000] 4 LRC 621
Navtej Singh Johar & Ors. v Union of India thr. Secretary Ministry of Law and Justice W.P. (Crl.) No. 76 of 2016. D.No.14961/2016