Influential Kenyan author Binyavanga Wainaina has revealed he is a homosexual in an autobiographical short story released to protest anti-gay laws on the continent.
One of Africa's most powerful writers and a founder of the Nairobi-based literary network Kwani, Wainaina published a story online at the weekend that announced his sexual orientation, entitled "I am a Homosexual, Mum".
The story has generated widespread support on social media, although also earning strong criticism from some.
"Ten million thank yous to the thousands of Africans and others who have given all kinds of public love, support," Wainaina said in a message on Twitter. "We live in a beautiful continent."
Homosexuality is outlawed in most African countries and discrimination is rife on the continent.
"I, Binyavanga Wainaina, quite honestly swear I have known I am a homosexual since I was five," he wrote in the short story.
"Nobody, nobody, ever in my life has heard this. Never, mum. I did not trust you, mum. And. I. Pulled air hard and balled it down into my navel, and let it out slow and firm, clean and without bumps out of my mouth, loud and clear over a shoulder, into her ear.
'I am a homosexual, mum'."
Homosexuality is outlawed in Kenya, although arrests are rare.
Elsewhere in Africa, Nigeria introduced a new law earlier this month against homosexuality. Under the law, same-sex couples who live together or attempt to solemnize their union with a ceremony can be punished with 14 years in prison.
"There is no country in the world with the diversity, confidence and talent and black pride like Nigeria," Wainaina said, adding that the "anti-gay marriage law shames us all."
In Kenya's neighbour Uganda, President Yoweri Museveni this month refused to approve a controversial bill that would have seen homosexuals jailed for life, but he also suggested homosexuality was caused by a genetic flaw, or a need to make money.
Wainaina was the winner of the Caine Prize for African Writing in 2002.