Nigerian President Goodluck Jonathan
© Akintunde AkinleyeNigerian President Goodluck Jonathan
At the beginning of this week, Kenyan author Binyavanga Wainaina made news around the world by coming out in an article first published by Africa is a Country and then by The Guardian. After the articles were spread, Wainaina became, in the words of the BBC, "one of the most high profile Africans" to disclose that he was gay.

The Kenyan's decision to write publicly about his sexuality was inspired, in part, by Nigeria's Same Sex Marriage Prohibition Act, which was signed into law earlier this month. Wainaina has since tweeted: "private pains of so many africans jamming my inboxes. deaths, beatings, public shames, blackmails, overnight jail cells. betrayed love."

The law is a throwback to the days of the country's military dictatorship, and makes it illegal for gay people to even hold a meeting. It criminalises gay clubs, associations and organisations, and threatens those involved with them with 14 years in prison. And if you don't report "suspected homosexuals", you could receive up to five years in jail yourself. The law also states that anyone who "directly or indirectly makes [a] public show of [a] same-sex amorous relationship in Nigeria commits an offence and shall each be liable on conviction to a term of ten years in prison".

Which is confusing; how exactly could you make an "indirect" public show of same-sex amorous feelings, and how would the police recognise it? If I'm out on the streets of Lagos and I tell a male friend I like his trainers, should I expect to do hard time?

The law is almost comic in its ridiculousness, but also incredibly depressing and deadly serious. Dozens of gay men have already been arrested under it and there have been reports of mob violence. "Among the poor and powerless, the law will be an excuse for lynchings and police harassments," says Tolu Ogunlesi, a Nigerian journalist.

Among the political and military elite, however, the law may well be used selectively. Some of these grand men, including one prominent rival of president Goodluck Jonathan's, are rumoured to be gay. So if you have cash and power, you'll presumably be able to keep on doing whatever you like in the privacy of your own massive home, as long as you aren't seen as being too much of a threat to any of your powerful political rivals.

Whether this is true or not, the Nigerian gay rights activist Rashidi Williams hit the nail on the head when he told me that the damage caused by this law is "actually for the ordinary Nigerian LGBT citizen, whose right to health is taken away, exposed to violence, deprived of association and peaceful assembly, invaded of their privacy, robbed of their sense of self-determination, condemned to the annals of hell and damaged psychosocially". It's populist politics at its worst - punishing ordinary people for political gain.

gay rights Nigeria
© Akintunde Akinleye
Since anyone can be arrested on the pretext that they are gay - or because they know someone who's gay - it is an abuse of the human rights of all Nigerians, gay or straight. As Mausi Segun, Human Rights Watch's Nigeria researcher, told me: "This law criminalises what are essentially private, personal relationships. Any Nigerian could be targeted."

On the 21st of January, the US ambassador to Nigeria, James Entwistle, threatened to scale back American health programmes in response to the law. On the same day, the former Nigerian Ambassador to the US, Dahiru Suleiman, described homosexuality as "animalistic and degrading to humanity".

Weirdly, the new law also criminalises something that is already criminal; in Nigeria, it's already illegal to be gay. "Why do they want to have four laws banning homosexuality?" asked Olumide Makanjuola, executive director of the Initiative For Equality in Nigeria. Sharia law - which allows for the stoning to death or lashing of anyone who commits "homosexual offences" - the criminal code and Nigeria's anti-sodomy laws all more than cover the "offence" of being gay. "I have always hidden my sexuality, even before this new bill was signed into law," one young gay Nigerian told me. "Being gay isn't something you parade before family and friends, because the chance that they won't understand is very high."

In a conservative, religious country, homophobia is rife, so gay marriage has never been on the agenda. "We're not asking for same-sex marriage because it's not a conversation Africa is ready to have," says Makanjuola, who is far more concerned that the clinics and meetings he organises for gay men to talk about HIV/AIDS will be raided under the terms of the law. "Doctors and lawyers work for me. The work they do would be seen as supporting homosexuality, which means that I could end up indirectly sending people to prison," he says.

The renowned LGBT activist Bisi Alimi - who had to leave Nigeria for London after the abuse he received for being the first man to come out on Nigerian television - also told me that he was most concerned about the registration of clubs and the provision of services. The Nigerian constitution protects rights to freedom of assembly, association and equality before the law, but apparently that's NBD to the current government where gay people are concerned.

In many ways, though, this piece of legislation is about what so many populist measures are about: diverting attention from massive government incompetence. "The bill is presently fuelling hatred and violence against LGBTI people across Nigeria," the Lagos-based human rights researcher Damian Ugwu wrote to me. "For now, it is conveniently serving the purpose which it was meant to serve in the first place - successfully distracting the attentions of Nigerians from the worsening political and economic situation in the country." The situation Damian refers to is one the government had once promised to tackle, not avoid.

During his 2011 election campaign, Goodluck Jonathan talked about addressing widespread corruption and rampant inequality in Nigeria (after all, wealth inequality in the country is so bad that it's now on a par with the UK). With enormous majorities, some good ministers and a stable party, Jonathan was in as good a position as any to do something about his country's problems. But, with an election now looming next year - which many in his own party don't want him to contest - things are worse than ever.

The militant group Boko Haram continues to terrorise the northeast of the country, deadly ethnic-religious clashes are taking place in the centre, endemic corruption is getting worse and there are persistent power shortages. At the same time, the situation in the oil-rich Niger Delta continues to be an absurd parody of uncontrollable greed. Oil theft is rampant, militancy is on the rise again and the region has stolen the piracy crown from Somalia. Multi-national companies continue to desecrate the environment and local elites turn a blind eye while happily enriching themselves.

With all these issues going unaddressed, the one thing Jonathan could guarantee support on was bashing homosexuality. International condemnation of the law has triggered nationalistic defences from across the political and religious spectrum within Nigeria, and the beleaguered president is benefitting from that.

As Africa Confidential's Andrew Weir points out, "Unscrupulous politicians in Africa who have come under attack from Western governments or NGOs for abuses of human rights or for stealing public funds sometimes try to deflect the criticism by picking fights with the West over the gay question. They can be fairly certain, unfortunately, that the evangelical churches, which have enormous influence, will support their homophobia."

Bisi Alimi
Bisi Alimi
"It's pretty difficult talking to people who can't see beyond religious bigotry," Bisi Alimi agrees.

The idea that homosexuality is "un-African" or a "Western perversion" is trotted out across Nigeria, while Christian and Muslim fundamentalists preach that being gay is an abomination to God or Allah. But if anything is a "Western perversion", it's homophobia. Across Africa, the majority of laws banning homosexuality were introduced by colonial powers. These colonial powers may have removed similar laws from their own statute books, but their affect has proved longer lasting throughout the continent. It's no surprise, then, that homosexuality is illegal in 41 out of 53 Commonwealth countries, because guess who wanted to make a big song and dance about how evil and ungodly being gay was? Imperial Brits.

Moreover, as Rashidi Williams points out, "Religion led to the legalisation of laws against homosexuals in the colonial era." Indigenous Nigerian culture was often not this way. Gods of West Africa's Yoruba people regularly had no fixed gender identity, and the yan daudu - "men who act like women" - of the Muslim north were tolerated as "part of an unremarkable but fringe subculture" until the recent revival of religious fundamentalism in that part of the country.

"White people have been able to demonise our history to make us feel inferior," says Alimi, cutting to the heart of the Nigerian hypocrisy that labels homosexuality as an effete Western evil, as well as Western hypocrisy regarding "unenlightened Africans".

John Kerry and the British High Commission have condemned the law, but whether this will amount to anything remains to be seen. "The international community cannot sanction Nigeria because they need our resources. So it is just a mere threat," says Mussodiq Sanni, chairman of the Muslim Lawyers' Association of Nigeria.

The man has a point. In 2011, David Cameron said he would block an aid increase to Nigeria if it went ahead with its gay-bashing law. Since then, he's said nothing and the UK's Department for International Development has confirmed that it will increase aid to Nigeria from £200 million to £270 million.

While there is a chance that the attention this law has attracted will lead to a space for an educated conversation about homosexuality in and outside of Nigeria, it seems just as likely that ordinary Nigerians will suffer while their government continues to rob the country blind, pausing every now and then to field the odd piece of sanctimonious criticism from international governments too interested in Nigeria's resources to actually do anything meaningful about continuous human rights violations.

Follow Oscar on Twitter: @oscarrickettnow