The maximum penalty is death in Mauritania, Somalia, and Nigeria in states where sharia law is applied. Life imprisonment is the maximum penalty for same-sex relations in Sudan, Tanzania, Uganda and Zambia. Jail terms of up to 14 years are possible in Gambia, Kenya and Malawi.
The High Court of Kenya in 2019 upheld a law criminalising consensual same-sex sexual activity, quoting reasons such as "it is an effective method to contain the country's HIV epidemic".
Homosexuality in Egypt is not a crime. However, discrimination against the LGBTQ community is rampant. Gay men are frequently arrested and typically charged with debauchery, immorality or profanity. Similarly, Ivory Coast does not criminalise gay sex but the region has recorded a number of cases of detention and prosecution of the LGBTQ community.
Tanzania has banned LGBTQ health clinics from accessing condoms and lubricants. Since 2018, the country has increased the use of forced anal examinations, which is a violation of personal dignity.
Broad protection against discrimination based on sexual orientation exists in three countries: Angola, Mauritius and South Africa. Employment protection exists in the same three countries as well as in Botswana, Cape Verde, Mozambique and Seychelles.
South Africa is the only African country where gay marriage is legal. In 2018, the cabinet approved a bill criminalising hate crimes and hate speech. However, South Africa has high rates of homophobic crime.
Botswana decriminalised homosexuality in 2019 and Gabon in 2020.