A cohort of 418 lower socioeconomic strata prostitutes were enrolled in a study of the epidemiology of sexually transmitted diseases (STDs) between January and April 1985. Sixty-two per cent of the women were seropositive for HIV infection at enrollment. Significant associations were found between HIV seropositivity and Tanzanian origin (OR = 2.12, CI 95% = 1.18-3.81, P less than 0.03), younger age, a shorter duration of prostitution, reduced fecundity, use of oral contraceptives (OR = 1.8, CI 95% = 1.1-2.9, P less than 0.05) and genital ulcer disease (OR = 3.32, P less than 0.00001). No associations were noted with other STD. Stepwise logistic regression analysis confirmed independent associations between HIV infection and Tanzanian origin (OR = 2.27, CI 95% = 1.25-4.14, P less than 0.007), reduced fecundity (OR = 0.83, CI 95% = 0.74-0.94, P less than 0.003), oral contraceptive use (OR = 2.02, CI 95% = 1.22-3.35, P less than 0.006) and duration of prostitution (OR = 0.39, CI 95% = 0.23-0.65, P less than 0.004). Oral contraceptives may increase susceptibility to HIV or may be a marker for other factors which increase risk of acquisition. Further studies are necessary to confirm this association.