To investigate the risk of infection with the human immunodeficiency virus (HIV) in San Francisco, the prevalence of antibodies to HIV was determined in 281 heterosexual intravenous drug users recruited from community-based settings. Ten per cent of subjects had ELISA and Western blot confirmed seropositivity for antibodies (95 per cent CI 6.8-14.2 per cent). Analysis of behavioral factors revealed an increased risk of seropositivity in addicts who reported regularly sharing needles when injecting, particularly those sharing with two or more persons (odds ratio = 5.43; 95 per cent CI 1.08-52.5). Blacks and Latinos also had a greater prevalence of seropositivity than Whites, and this finding persisted after adjustment for needle sharing (adjusted odds ratio = 2.8; 95 per cent CI .84-8.59). Seropositivity was not associated with age, sex, duration of drug use, or history of prostitution. These data indicate that a new epidemic of AIDS (acquired immunodeficiency syndrome) in intravenous drug users, similar to that which has occurred among homosexuals in San Francisco, is possible. The relatively low seroprevalence in 1985 provides health officials an important opportunity to intervene and attempt to prevent widespread infection of drug users with HIV.