In most countries on the African continent including North Africa, same-sex relations are illegal and LGBT persons face discrimination and violation of fundamental rights. Homosexual acts are illegal in 38 African countries. In four of these countries (Mauritania, Sudan, 12 northern states in Nigeria and in the southern parts of Somalia) homosexual acts are punishable with death penalty.
Liberian law currently does not explicitly address homosexuality, however, same-sex sexual activity is considered de facto illegal. In July 2012, the Liberian Senate passed into law a bill to prevent same-sex marriages. There is no legal protection against discrimination based on sexual orientation or gender identity.
Information on the conditions for LGBT people in Mali is very scarce.
LGBT persons in Mali may face legal challenges not experienced by non-LGBT residents.Neither male nor female same-sex sexual activity is specifically prohibited in Mali, but public laws may be used against LGBT persons.
In Mozambique there are no explicit laws against homosexual acts. However, the Penal Code does contain an offence of "practices against nature". According to ILGA, this clause could potentially be interpreted as including male and female same-sex sexual activity, even though it is unknown to what extent the law is enforced.
Namibia has had a troubled history in regards to the protection of the rights and civil liberties of lesbian, gay, bisexual, and transgender citizens. "Sodomy" is illegal in Namibia, and is punishable with prison.
Furthermore, statements by government leaders, such as Sam Nujoma, Theopolina Mushelenga and Jerry Ekandjo, concerning gays and lesbians have drawn both domestic and international condemnation.
Rwanda is leading the progress on human rights for LGBTI persons in East Africa. In 2010 Rwanda eliminated the criminalisation provision from its draft code and recently signed two UN resolutions on sexual orientation and gender identity, as the only African nation to do so.
Information on the conditions for LGBT people in Somalia is very scarce.
LGBT rights in Somalia fall under the scope of Somalia's federal laws. As such, homosexuality is illegal in the country and is punishable by imprisonment. In some parts of Somalia homosexuality is punished by death.
South Africa's post-apartheid constitution was the first in the world to outlaw discrimination based on sexual orientation, and in 2006 South Africa became the fifth country in the world, and the first in Africa, to legalise same-sex marriage. While these are significant advances, LGBT people in South Africa continue to face hostility and violence.
Same-sex sexual activity is illegal in Sudan. The judicial system is based on the Shari'a and according to Article 148, capital punishment applies should the offense be committed either by a man or a woman. For homosexual men, lashes are given for the first offence, with the death penalty following the third offence.