The term as we use it now, that is, the use of condoms in order to protect against sexually transmitted diseases, originated in the US in the mid 1980s following the rise in the number of cases of HIV and AIDS. The term was widely used in the press from 1984 onward; for example, this extract from an AIDS-awareness campaign, reported in The Daily Intelligencer, January 1984 :
“The goal
is to reach about 50 million people
with messages about safe sex
and AIDS education.”
References to the earlier, ‘avoidance of sex’ meaning date back to at least the 1930s. here’s an example from The Stevens Point Daily Journal, March 1939:
“For general health and safe sex
habits, children of the same sex or
different sex should have separate
beds.”
[Children who weren’t of the same sex or different sex could presumably make their own arrangements.]
This point of view persisted through the 20th century and continues to do so, although the inclusion of the quotation marks in this piece from Hans Sebald’s Adolescence: A Social Psychological Analysis, 1968, suggests that the term had already another common meaning by the 1960s:
Analytical observers concluded that this type of dancing was “safe sex” for the teen-agers.
It may be that Sebald was drawing a distinction between his abstinence meaning and the birth control meaning. That was in vogue by the 1960s; for example, this piece from the Vermont paper The Bennington Banner, March 1966:
“Sex outside the marriage
bond is condemned, not for the
naturalistic reasons put forth
by some liberal Protestants, but
because it violates the high,
Christ – and – church analogy.
Thus, the use of birth control
devices to permit ‘safe’ sex
before or outside of marriage
is similarly unchristian.”