To compare the prevalences of demographic, historic, and behavioral risks for pelvic inflammatory disease among women with sexually transmitted disease (STD) pelvic inflammatory disease versus those with non-STD pelvic inflammatory disease. Subjects included patients diagnosed with acute pelvic inflammatory disease at San Francisco General Hospital between January 1, 1981 and August 20, 1989, who had been entered into clinical treatment trials. At a minimum, endocervical cultures for Neisseria gonorrhoeae and Chlamydia trachomatis were required for study eligibility. All but nine women also had upper reproductive tract cultures for N gonorrhoeae, C trachomatis, and anaerobic and facultative bacteria. Five hundred eighty-nine patients were included in this analysis. The medical records of study subjects enrolled between January 1981 and October 1986 were abstracted (n = 321). Subjects recruited after October 1986 were interviewed during hospitalization using a standardized data base instrument (n = 268). Independent variables examined included age, race, insurance status, education, pregnancy history, menstrual history, contraceptive history, sexual history, douching history, STD history, and pelvic inflammatory disease history. Both univariate associations and multivariate (multiple logistic regression) analysis were performed. An STD organism was present in 65% of pelvic inflammatory disease cases. Neisseria gonorrhoeae and C trachomatis were recovered from 324 (55%) and 129 (22%) of the patients, respectively. In 30% of cases only anaerobic and/or facultative bacteria were isolated. In univariate analysis of STD versus non-STD pelvic inflammatory disease, statistically significant increases in STD risks were found for the following: black race (relative risk [RR] 1.76; 95% confidence interval [CI] 1.39-2.24), two or more sexual partners in the past 30 days (RR 1.25; 95% CI 1.08-1.45), no contraception (RR 1.36; 95% CI 1.18-2.57), N gonorrhoeae with previous episode of pelvic inflammatory disease (RR 1.97, 95% CI 1.39-2.80), and reported duration of pain 3 days or less (RR 1.17; 95% CI 1.02-1.35). Risks associated with non-STD pelvic inflammatory disease included: current intrauterine device (IUD) use (RR 0.25; 95% CI 0.11-0.61), history of IUD use (RR 0.82; 95% CI 0.68-0.98), and pelvic surgery in the past 30 days (RR 0.48; 95% CI 0.30-0.76). Multivariate analysis of the risks found that black race was associated with STD pelvic inflammatory disease (odds ratio 2.56; 95% CI 1.68-3.90), and current IUD use was associated with non-STD pelvic inflammatory disease (odds ratio 3.87; 95% CI 1.30-11.53). Neither univariate nor multivariate analysis identified douching as a risk differentiating STD from non-STD pelvic inflammatory disease. Pelvic inflammatory disease is a complex polymicrobial disease. This study demonstrates that risk factors associated with pelvic inflammatory disease cases can be differentiated by microbial etiology. We found that black race was associated with STD pelvic inflammatory disease and recent IUD use was associated with non-STD pelvic inflammatory disease.