On October 29, governor of Tanzania’s largest city Dar-es-Salaam, Paul Makonda, announced that he formed an anti-gay unit to hunt down “suspected” homosexuals. Makonda is an ardent Christian and close ally of Tanzanian President John Magufuli, a traditionalist who believes “even cows disapprove of” homosexuality.

The Tanzanian government distanced itself from Makonda’s latest anti-gay witch-hunt a full five days after it made headlines in local media, by stating that his planned crackdown “is not part of official policy”. However, the government’s belated attempt to denounce Makonda’s actions hardly diminishes the Magufuli administration’s long-running and brutal campaign against homosexuality and Lesbian, Gay, Bisexual, Transgender and Intersex (LGBTI) individuals.

Tanzania is not the only African country which has recently started cracking down on LGBTI communities. Egypt, Kenya and Malawi have also targeted LGBTI individuals in recent years. Homosexuality is illegal in 34 African countries and a crime punishable by death in Mauritania, Sudan, Northern Nigeria and Southern Somalia.

African leaders often cite culture and Christianity as reasons for outlawing homosexuality. Uganda’s President Yoweri Museveni has called gays “disgusting” and labelled homosexuality “a western import”. Kenya’s Deputy President William Ruto has also made his rejection of the LGBTI community public by saying, “We will not allow homosexuality in our society as it violates our religious and cultural beliefs.”

Playing politics with colonial-era policies

But is homosexuality really a western import to Africa as Museveni claims? And does violent suppression of the LGBTI community really reflect “African values”?

Extensive research on African sexual practices demonstrates that homosexual relationships have been prevalent in Africa long before the arrival of colonial powers. These studies show that Africans, just like people all over the world, have always had a range of sexualities and sexual identities. Moreover, research indicates homosexuality was not only practised, but also accepted as normal by communities in Southern Africa.

Many anti-homosexuality laws found in Africa today were actually promulgated by colonial governments and supported by the growing influence of Catholic and Protestant evangelism and an increasingly conservative and rigid interpretation of Islam.

More recently, there has been a phenomenal upsurge in “missionarism” and a significant increase in the number of Pentecostal churches across Africa. Sadly, most Pentecostal and traditional churches promote a fundamentalist reading of the Bible that rejects homosexuality.

As religious organisations gained immeasurable popularity over the years, religious leaders also accumulated substantial influence over politicians. Backed by millions of faithful followers, they have become influential power brokers in Ghana, Nigeria, Uganda, Zambia and Zimbabwe.

In a continent afflicted with extreme poverty, economic inequality and hotly contested electoral spaces, policymakers have jumped onto the opportunity of gaining electoral expediency and popularity by simply aligning themselves with religious values and popular religious movements. This allowed religious leaders in Africa to lobby effectively for conservative agendas, including anti-gay policies. This type of religious anti-gay lobbying is particularly rife in Kenya and Uganda.

While religious leaders used their influence over politicians to further their anti-LGBTI agendas, politicians used anti-gay policies and discourses to hide their failings and make their oppressive and anti-democratic methods more palatable to their deeply religious constituents. For example, Museveni’s long and bloody clampdown on political dissent has run parallel with a sustained suppression of LGBTI rights, which helped him sustain the support of country’s prominent religious leaders and their followers.

By targeting LGBTI communities and infusing their sexuality with religious suggestions of grotesque madness and immorality, African leaders seek to deflect attention from their political failings and crimes. And, by peddling the myth that “homosexuality is a western construct”, they are trying to strengthen the belief that western actors are behind all of Africa’s problems, including a litany of homegrown economic disasters.

Patriotism is the last refuge of a failed African politician

African politicians often try to subdue and control peoples robbed of decent livelihoods by promoting pseudo religious and nationalistic values that give them a proud identity, meaningful communal character and comfortable assurance.

Communities deprived of a crucial say in important political matters by dubious and despotic governments can be tricked into a false sense of control and power when they are encouraged to name and supposedly shame individuals wrongfully adjudged to be different and immoral.

It is a sick, mad and twisted political strategy, but it works. Such “us versus them” narratives, usually based on distorted readings of history, religious teachings and cultural values, allow politicians and religious leaders to manipulate and subdue desperately underprivileged masses.

But homophobia, and the vicious and exclusionary social dynamic that promotes it, does not belong in Africa. It is contrary to our African way of life and culture.

It is time for Africa to embrace different sexual identities and sexual practices in a fresh, mature and progressive manner. Former Anglican Archbishop Desmond Tutu, a passionate advocate of LGBTI rights and human rights and an anti-apartheid icon, showed the right path long ago when he condemned church groups using religion as a justification for anti-gay violence and discrimination.

“I would not worship a God who is homophobic and that is how deeply I feel about this,” Tutu said.

Africans should follow the archbishop’s lead.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.