To clarify risk factors for infection with the human immunodeficiency virus (HIV) we selected at random 785 homosexual men who had participated in studies of hepatitis B in San Francisco in 1978-80 for a follow-up study of the acquired immunodeficiency syndrome. Although most had not been contacted in over five years, 492 (63 per cent) were located and enrolled. The 240 (67 per cent) who had developed antibodies to HIV, as measured by an enzyme-linked immunosorbent assay (ELISA), were compared with 119 who had remained seronegative. In multivariate analyses, receptive anal intercourse with ejaculation by nonsteady sexual partners, many sexual partners per month, and other indicators of high levels of sexual activity were highly associated with seroconversions. None of the sexual practices that we studied appeared to offer protection against HIV infection.