NAIROBI, Kenya (AP) -- African literary light Binyavanga Wainaina says he's known he was gay since he was 5 though he did not have a homosexual encounter until he was 39.
To celebrate his 43rd birthday, the prize-winning Kenyan has published an online essay telling the world that he is gay. His story contributes to an increasingly fierce debate about gays in Africa and is a protest against laws that seek to further criminalize homosexuality.
It is illegal to have gay sex in most African countries. Gays in many parts of the continent face severe harassment, physical threats and judicial punishment. Kenya has a law banning sodomy. Uganda, a neighbor to the west, recently passed legislation that calls for life in prison for some gay acts.
Wainaina's essay, painful to read, this week announced what he wishes he had told his mother before she died 14 years ago: "I am a homosexual, mum."
In an interview with The Associated Press on Wednesday, he said he came out to help preserve his dignity.
"All people have dignity. There's nobody who was born without a soul and a spirit," he said. " There is nobody who is a beast or an animal, right?
"Every one, we, we homosexuals, are people and we need our oxygen to breathe."
Wainaina, whose hair is dyed in rainbow colors, lashed out at recently passed laws against homosexuality in Nigeria and Uganda. He also criticized Russian President Vladimir Putin, who faces criticism over Russia's law banning "gay propaganda" aimed at youth.
"I can't sleep at night because there are people who I may know or who I don't even know ... who may be dying or being beaten or being tortured right now in a Nigerian cell or three weeks ago in a Ugandan one," he said.
Dennis Nzioka, a gay right activist in Kenya, welcomed Wainaina's public announcement and said his prominence may influence other gay people in Africa and Kenya to come out publicly -- particularly the older professionals who have been living a double life.
Nzioka said Wainaina's announcement was both inspirational and courageous.
"Courageous, because to do this in the Kenyan society knowing very well what he can face; ostracization and rejection," Nzioka said.
He said the reaction of most people was negative and is symptomatic to the homophobia that exists in Kenya.
In Nigeria on Wednesday, thousands of protesters demanded the executions of 11 men arrested for belonging to gay organizations.
Demonstrators threw stones into the Shariah court in the north Nigerian city of Bauchi until security officials fired into the air. The judge closed the court abruptly so the accused men could be safely returned to prison.
They were detained in a frenzy of arrests of alleged gays apparently precipitated by this month's passage of a new bill that further criminalizes homosexuality. The Same Sex Prohibition Act makes it illegal to even hold a gay meeting -- a law that human rights activists say will endanger efforts to fight AIDS.
In Kenya, homosexuality is not a crime, but the law forbids sodomy, and partners of the same sex are likely to receive extra attention from police. Wainaina said he is not afraid to come out. He accused weak leaders of politicizing sexual orientation.
In Nigeria, President Goodluck Jonathan signed the new law as his own party fractured over his perceived desire to run for re-election next year.
"You are like, mmm, what's a cheap, easy way to score points, because you always need gangs right? Every human being has a bit of gangster in him," Wainaina said. "You should press the right button."
Associated Press Writer Tom Odula contributed to this report from Nairobi, Kenya.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.