Journalist, writer and curator of the Wall of Great Africans
Going into this week, Uganda already had the most severe anti-homosexuality law in the East African Community, punishing the "unnatural act" with up to life imprisonment.
On Tuesday, a fully charged Parliament passed a controversial new law that raised the stakes, providing death as the penalty for "aggravated homosexuality." By so doing, Uganda set itself apart from an already fairly homophobic East Africa, throwing its lot with Nigeria, Mauritania, Sudan and Somalia as the only countries in Africa where homosexuality is punishable by death.
East African national and state attitudes toward lesbian, gay, bisexual, transgender, queer, questioning, intersex, and asexual (LGBTQIA) rights present a mixed bag. One would have expected that the country that is most locked into the global economy, Kenya, would have the most liberal legal regime on LGBTQIA rights. No. In the statute books, homosexuality is criminalised in Kenya, but in practice, gay people have more public wiggle room. The courts have expanded their rights based on a liberal reading of the country's progressive 2010 Constitution.
In late February, the Kenyan Supreme Court ruled that the National Gay and Lesbian Human Rights Commission (NGLHRC) be allowed to officially register as a non-governmental organisation, ending a ten-year legal battle.
New anti-gay crusade
As in Uganda, the ruling aroused politicians and church people to launch a new anti-gay crusade in Kenya.
This disparate picture also makes it hard to locate common factors driving homophobia. It can't be the level of corruption. Rwanda is the least corrupt EAC country, but its legal regime on gay rights is at the same level as DRC's, which is struggling at the bottom, with Burundi and South Sudan for the most corrupt title. Uganda wouldn't be the most punitive because it is not the most corrupt EAC nation.
It can't be underlying attitudes toward transactional sex. If it were, South Sudan and DRC, where prostitution is legal, would have the most liberal laws towards homosexuality. In fact, the irony here is that in Uganda, Kenya and Tanzania, where prostitution is illegal, it is more widespread than in the EAC countries where it is legal.
Political and social crises
What seems to explain the level of homophobia are political and social crises. Deep political fractures, as in Kenya and Uganda, tend to produce big anti-LGBTQIA moments because homophobia is a great bipartisan issue. The anti-gay clamour in Kenya produced a brief and rare consensus between the country's bitterly warring political factions.
In Uganda, the frontline troops in the latest stringent law were from the opposition ranks. The two legislators who dissented on record against the bill were both from President Yoweri Museveni's ruling National Resistance Movement (NRM), one his former legal adviser.
Uganda and the leading homophobe nations in EAC also face a social crisis, expressed in, for example, scandalously high teenage pregnancies and epidemics of defilement.
Least anti-gay hysteria
By contrast, Rwanda, where there is the least anti-gay hysteria currently, has the region's lowest rate of teenage pregnancies.
Uganda also has the highest alcohol consumption in East Africa, and the illegal variety of the brew drunk by many in the country is wasting away hundreds of thousands of young lives.
To compound matters, Uganda is also undergoing the most far-reaching challenge to the traditional family and the closest thing you have to a subversive sexual revolution in East Africa today. The new anti-homosexuality bill, therefore, is a larger platform to organise a national morality comeback. In that sense, it is about something other than gay sex.
Married couple
This was signalled by the bill's architect Asuman Basalirwa, a member of a minor opposition party in Parliament. Appearing before a committee set up to review his bill, he said the law needs to ban oral and anal sex between a married couple: "I have had an opportunity to speak to some counsellors; they have talked of incidents where a man is married to a woman and instead of using the normal address, is using the wrong address," he said.
 "They said this aspect is lacking in the bill, and I want at this point in time to bring it to the attention of the committee that it should be considered," Basalirwa added.
"Wrong address" was an expression coined by President Museveni to connote any other form of sex other than via the traditional heterosexual channels sanctioned by the Bible.
Future versions
Therefore, Uganda's latest anti-homosexuality bill is by no means its last, at least not during the rule of President Museveni. Future versions, coming even as early as 2025, before Museveni goes for a record-shattering ninth term in office in 2026, shouldn't be a surprise. They will likely address Basalirwa's concerns about deviations in heterosexual marriages.
In a similar vein, a proposed bill on assisted reproductive technology requires a fertility centre to demand proof of marriage from a couple seeking its services. The bill thus effectively bans fertility treatment for unmarried people, who are seen as the scourge on Uganda's moral purity.
Collectively, this will enable the ageing political class to have a weapon against the new generation of younger politicians and their supporters, who will be cast as perverts who don't honour the nation's cultural codes.
In the years ahead, a rainbow flag divide could emerge within the region. With the more sexually open-minded East African capitals attracting global activities that don't require one to pass an LGBTQIA test to attend, and those that are avoided by a sexually ambivalent global citizenry, afraid they might be hanged.
Charles Onyango-Obbo is a journalist, writer, and curator of the "Wall of Great Africans". Twitter@cobbo3