Male homosexuality had been illegal under § 175 regardless of age since 1872. Female homosexuality was not prosecuted. In West Germany, male homosexuality was legalized in 1969. The age of consent was set to 21 years and reduced to 18 years in 1975. Only men of 18 or older could be offenders and courts could refrain from punishment if the offender was not yet 21. In East Germany, the criminal code was supplemented in 1957 by a provision that allowed the waiving of prosecution if no harm had been done to socialist society by the unlawful act. Concerning § 175, this meant that male homosexual acts were prosecuted only if they involved minors, which meant persons under 18. The new criminal code of 1968 officially legalized homosexuality and in § 151, which now was gender-neutral, criminalized only homosexual acts of adults with minors. In 1987 the GDR supreme court ruled homosexuality was a variant of sexual behaviour just as heterosexuality. In 1989 § 151 was repealed and § 149 amended to include any sexual orientation.