To study the relationship of cocaine use to syphilis and human immunodeficiency virus infections a blinded urine and serum survey was performed among parturient women at an inner city hospital. Discarded urine samples of 1206 parturient women were saved and given code numbers that were also assigned to data sheets containing nonidentifying information, including prenatal care status and syphilis serologic results. In the latter part of the study blood remaining after syphilis serologic tests were performed (n = 480) were tested for human immunodeficiency virus antibodies. Overall 12.9% of urine samples had cocaine derivatives, 1.4% opiates, 1.5% marijuana, 0.0% benzodiazepine, and 0.3% methadone. The prevalence of positive rapid plasma reagin tests was 18.7% among patients with positive urine toxicologic tests for cocaine and 2.41% for patients with negative urine tests (odds ratio = 9.3, 95% confidence interval 5.2 to 16.5, p less than 0.001). Fluorescent treponemal antibodies were also significantly more frequent among patients with positive urine samples. Four of 53 (7.6%) patients with positive urine toxicologic screens were human immunodeficiency virus antibody positive compared with six of 427 (1.4%) women with negative screens (odds ratio = 5.7, 95% confidence interval = 1.4 to 21.5, p = 0.019). Cocaine patients with positive cocaine screens and with syphilis or human immunodeficiency virus had prenatal care in 6 of 21 (28.6%) and 0 of 4 (0%) cases, respectively, while patients with negative cocaine screens and syphilis or human immunodeficiency virus had prenatal care in 13 of 18 (72.2%) and 5 of 6 (83.3%) cases, respectively (p = 0.010 and p = 0.048). Cocaine use appears to be associated with both the acquisition of human immunodeficiency virus and syphilis and the failure of infected individuals to utilize prenatal services.