Criminal Law (Sexual Offences and Related Matters) Amendment Act, 2007

The Criminal Law (Sexual Offences and Related Matters) Amendment Act, 2007 (Act No. 32 of 2007; also referred to as the Sexual Offences Act) is an act of the Parliament of South Africa that reformed and codified the law relating to sex offences. It repealed various common law crimes (including rape and indecent assault) and replaced them with statutory crimes defined on a gender-neutral basis. It expanded the definition of rape, previously limited to vaginal sex, to include all non-consensual penetration; and it equalised the age of consent for heterosexual and homosexual sex at 16. The act provides various services to the victims of sexual offences, including free post-exposure prophylaxis for HIV, and the ability to obtain a court order to compel HIV testing of the alleged offender. It also created the National Register for Sex Offenders, which records the details of those convicted of sexual offences against children or people who are mentally disabled.

List of offences
The following offences are prohibited by the act.
 * Rape (sec. 3)
 * Compelled rape (sec. 4)
 * Sexual assault (sec. 5)
 * Compelled sexual assault (sec. 6)
 * Compelled self-sexual assault (sec. 7)
 * Compelling or causing a person 18 years or older to witness a sexual offence, a sexual act, or self-masturbation (sec. 8)
 * Exposing or displaying or causing the exposure or display of genital organs, anus or female breasts to a person 18 years or older (flashing) (sec. 9)
 * Exposing or displaying or causing the exposure or display of child pornography to a person 18 years or older (sec. 10)
 * Engaging the sexual services of a person 18 years or older (sec. 11)
 * Incest (sec. 12)
 * Bestiality (sec. 13)
 * Committing a sexual act with a corpse (necrophilia) (sec. 14)
 * Committing an act of consensual sexual penetration with a child (statutory rape) (sec. 15)
 * Committing an act of consensual sexual violation with a child (statutory sexual assault) (sec. 16)
 * Sexual exploitation of a child; being involved in, furthering, benefiting from, or living from the earnings of the sexual exploitation of a child; or promoting child sex tours (sec. 17)
 * Sexual grooming of a child or promoting the sexual grooming of a child (sec. 18)
 * Exposing or displaying or causing the exposure or display of child pornography or pornography to a child (sec. 19)
 * Using a child for or benefiting from child pornography (sec. 20)
 * Compelling or causing a child to witness a sexual offence, a sexual act or self-masturbation (sec. 21)
 * Exposing or displaying or causing the exposure or display of genital organs, anus or female breasts to a child (sec. 22)
 * Sexual exploitation of a person who is mentally disabled; being involved in, furthering, benefiting from, or living from the earnings of the sexual exploitation of a person who is mentally disabled; or promoting sex tours with persons who are mentally disabled (sec. 23)
 * Sexual grooming of a person who is mentally disabled or promoting the sexual grooming of a person who is mentally disabled (sec. 24)
 * Exposing or displaying or causing the exposure or display of child pornography or pornography to a person who is mentally disabled (sec. 25)
 * Using, or benefiting from using, a person who is mentally disabled for pornographic purposes. (sec. 26)

Constitutional challenges
In May 2012 the Western Cape High Court ruled that many of the sections of the act were not enforceable because they did not prescribe specific sentences for the crimes, which violated the principle of legality ("nulla poena sine lege"). In July, the ruling was overturned by the Supreme Court of Appeal, which ruled that courts have the discretion to impose an appropriate sentence in each case. In the same month, Parliament passed an amendment to close the potential loophole.

In an October 2013 judgment, the Constitutional Court found the statutory rape and statutory sexual assault provisions to be unconstitutional to the extent that they made it a crime for children between 12 and 16 to engage in consensual sexual activities with other children in the same age range. In 2015, Parliament amended the law so that consensual sex between two children between 12 and 16, or between a child under 16 and one over 16 if the age difference is less than two years, is no longer a crime.

In June 2018, the unanimous Constitutional Court found that the twenty-year statute of limitations on sexual offenses was unconstitutional.