Immorality Act was the title of two acts of the Parliament of South Africa which prohibited, amongst other things, sexual relations between white people and people of other races. The first Immorality Act, of 1927, prohibited sex between whites and blacks, until amended in 1950 to prohibit sex between whites and all non-whites. The second Immorality Act, of 1957, continued this prohibition and also dealt with many other sex offences. The ban on interracial sex was lifted in 1985, but certain sections of the 1957 act dealing with prostitution remain in force as the "Sexual Offences Act, 1957".
The Immorality Act, 1927 (Act No. 5 of 1927) prohibited sexual intercourse outside of marriage between "Europeans" (white people) and "natives" (black people). The penalty was up to five years imprisonment for the man and four years imprisonment for the woman. A person’s color during trial was dictated by their ‘race’, a term which at the time described a person’s appearance, mannerisms, and assumed descent/ethnicity (similar to later ‘color classifications’ recognized during the Apartheid era of South African history, where races were decided upon by government officials, not pre-determined by the true ethnicity of the accused). The act also prohibited "procuring" women for interracial intercourse, and contained a proposal that described a punishment of up to six years of imprisonment specifically for colored women who were thought to be provoking white males to have intercourse with them.
The Immorality Amendment Act, 1950 (Act No. 21 of 1950) amended the 1927 act to forbid unmarried sexual intercourse between "Europeans" and anyone not "European". The prohibition was therefore extended to intercourse between white people and coloured or Asian people. Interracial marriages had been banned in 1949 by the Prohibition of Mixed Marriages Act. Later legislation closely related to the Immorality Act also banned the marriage of interracial couples outside of South Africa, viewing foreign marriages as invalid and illegal.
The Immorality Act, 1957 (Act No. 23 of 1957; subsequently renamed the Sexual Offences Act, 1957) repealed the 1927 and 1950 acts and replaced them with a clause prohibiting sexual intercourse or "immoral or indecent acts" between white people and anyone not white. It increased the penalty to up to seven years imprisonment for both partners. The 1957 act also prohibited brothel-keeping, procuring, and living off the proceeds of prostitution; and it prohibited sexual intercourse with people under the age of sixteen.