The age of consent in Africa for sexual activity varies by jurisdiction across the continent. It ranges from age 12 in Angola to age 18. The specific activity engaged in or the gender of its participants can also be affected by the law. Below is a discussion of the various laws dealing with this subject. The highlighted age refers to an age at or above which an individual can engage in unfettered sexual relations with another person who is also at or above that age. Other variables, for example homosexual and/or sodomy provision(s) that are illegal or close in age exceptions may exist and are stated when relevant.

The age of consent in Algeria is 16 for vaginal intercourse. "Heterosexual Sodomy" (anal and/or oral sex with an opposite-sex partner) is illegal, Article 388 of the Penal Code. As well as all same-sex sexual conduct, Article 338, and "outrages to public decency", Article 333. The punishment for both the first two activities with those under 18 years of age is more severe for the older participant.[1]

The age of consent in Angola is 12 regardless of sexual orientation and/or gender.[2] However, while rarely prosecuted, sexual relations with a child between the ages of 12 and 15 are considered sexual abuse which is punishable with up to 8 years in prison.[3]

Under the new Penal Code of 2009 (in French), the age of consent in Burundi for heterosexuals (both men and women) is 18 years.[6] However, under Article 567, homosexual acts (both men and women) carry a fine of up to 100,000 Burundian francs and up to 3 years imprisonment.[7]

The age of consent is 18 regardless of sexual orientation and/or gender.[15] Although Djiboutian law establishes that parties to a marriage should be 18 or over, there is an exemption in cases where minors may marry with the consent of their guardians. Effectively this means the age of consent is lower than 18, especially in rural areas; in 2007, 13.6% of married women under the age of 50 married before the age of 18.[16]

The minimum age for consensual sex is 18 years.[9] The law, however, is not enforced; nearly 20% of girls are married by the age of 15. Early childhood marriage is especially common in rural areas, where some girls are married as young as 7 years old.[20]

The age of consent in Kenya is 18 years, as children are defined under 18 and are not able to give consent.[26] Marriage is possible at ages of 18 or less; although the law is unclear, this probably confers adult status to the participant.[27] Male homosexuality in Kenya is illegal; female homosexuality may be illegal.[28]

The age of consent in Liberia is 18.[30] Statutory rape is a first-degree rape offense which carries a maximum sentence of life imprisonment. The age of consent was raised to 18, from 16, in 2009.[31][32]

During the Gaddafi government, the regular age of consent was 18, but 16 years old women could be married as long the parents consented. Pre-marital sex was illegal.

After the 2011 revolution, the age of consent limit was removed. Presently, there is no defined age of consent, although sex is not allowed outside of marriage.[33] However, the law is practically never enforced due to the Libyan Civil War.

The age of consent is 16.[36] However, under section 306 of the Legal Code, any act that violates Islamic Morality is illegal, but a clear definition of morality does not exist in the country's laws, so it is very open to interpretation by local officials as to what is moral and what is not. Thus, many acts surrounding the age of consent could be considered illegal.[37]

a) has or attempts to have unlawful carnal intercourse with a girl under the age of sixteen (16) years; or

b) commits or attempts to commit with such a girl an immoral or indecent act;

c) solicits or entices such a girl to the commission of an immoral or indecent act, -shall be guilty of an offence and liable on conviction to imprisonment for a period not exceeding six years with or without a fine not exceeding three thousand rand in addition to such imprisonment.

(2) It shall be a sufficient defence to any charge in terms of this section if it appears to the court -

a) that the girl at the time of the commission of the offence was a prostitute, that the person so charged was at the said time under the age of twenty-one (21) years and that it is the first occasion on which he is so charged; or

b) that the person who charged was at the said time under the age of sixteen (16) years ; and

c) that the girl or person in whose charge she was, deceived the person so charged into believing that she was over the age of sixteen (16) years at the said time.' [41]

The age of consent is 18 regardless of sexual orientation and/or gender.[47]

According to the U.S. State Department, the Seychelles age of consent is "traditionally understood" to be 15 but that the country's statutes "fail to clearly define the ages of consent and legal majority" and causing confusion in regards to the "traditionally understood" age of consent and the age of majority of 18 and therefore complicating enforcement of the law.[48]

Article 29 of the national constitution of Somalia defines a child as any individual under the age of 18, and stipulates that "every child has the right to be protected from mistreatment, neglect, abuse, or degradation." This information, however, does not prove that there is an actual age of consent, thus making it difficult to draw a line.[50] Homosexual sex is illegal.[51]

The age of consent in South Africa is 16, as specified by sections 15 and 16 of the Criminal Law (Sexual Offences and Related Matters) Amendment Act, 2007. Section 15 ("statutory rape") prohibits the commission of "an act of sexual penetration with a child who is 12 years of age or older but under the age of 16 years", while section 16 ("statutory sexual assault") prohibits the commission of "an act of sexual violation with a child who is 12 years of age or older but under the age of 16 years".[52] The law includes a close-in-age exception, so that sexual acts between two children where both are between 12 and 16, or where one is under 16 and the other is less than two years older, are not criminal.[52] Children under the age of 12 are conclusively presumed by the law to be incapable of consenting, so a sexual act with a child under that age constitutes rape or sexual assault.[53]

The Girls' and Mentally Defective Women's Protection Act, 1916, which replaced the differing age of consent laws of the four colonies that formed the Union of South Africa, criminalised sexual intercourse between a man and a girl under the age of sixteen unless they were married. This act was replaced by a similar prohibition in section 14 of the Immorality Act, 1957. Although sex between men was already illegal, prohibited by the common law as "sodomy" or "unnatural sexual acts", the Immorality Act also criminalised sexual intercourse between a man and a boy under sixteen.

In the Criminal Law (Sexual Offences and Related Matters) Amendment Act, 2007, Parliament reformed and codified the law on sexual offences and made it gender-neutral. The common-law presumption relating to girls under 12 was replaced by a general presumption that children under 12 cannot consent. The act also fixed the age of consent at 16 for all sexual acts. In the 2008 case of Geldenhuys v National Director of Public Prosecutions, the Constitutional Court held that the former difference in the ages of consent had been unconstitutional.[56]

A girl under the age of fourteen (14) cannot consent to sexual intercourse under criminal law. However, under Statutory Law, according to the Girls and Women Protection Act, a girl under the age of sixteen (16) can not in any way consent to sexual intercourse.[62]

The age of consent in Tunisia is 18 (since 2010). However, there appears to be a marital exception in the law that allows a minor over 15 to consent to sex with an adult if the minor is married to the adult.[65][66]

The age of consent in Uganda is 18 years, for vaginal intercourse. "Heterosexual sodomy" (anal and/or oral sex with an opposite-sex partner) and all same-sex sexual conduct was illegal until January 2014 when President Museveni blocked the anti-gay law.

^"2010 Human Rights Report: Tanzania". State.gov. 2011-04-08. Retrieved 2014-02-19. "The law provides that sexual intercourse with a child under 18 years is rape, regardless of consent; however, the law was not enforced."