An influential Kenyan author has revealed he is a homosexual in an autobiographical short story released to protest against anti-gay laws on the continent.
Binyavanga Wainaina, one of Africa's most powerful writers and a founder of the Nairobi-based literary network Kwani, published a short story online at the weekend that announced his sexual orientation, called I am a Homosexual, Mum.
I quite honestly swear I have known I am a homosexual since I was five.
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 many 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... I did not trust you, mum. I am a homosexual, mum'."
Homosexuality is outlawed in Kenya, although arrests are rare.
Nigeria introduced a new law earlier this month against homosexuality. Under the law, same-sex couples who live together or attempt to solemnise 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.