To identify risk factors for HIV infection among women not known to be members of high-risk groups in Dar-es-Salaam, Tanzania, and assess associations between contraceptive use and HIV infection, we conducted a cross-sectional case-control study at three representative family planning clinics. Between February 1991 and June 1992, we enrolled 2,285 women; women were interviewed using a structured questionnaire, and specimens were collected for laboratory diagnosis of HIV and other sexually transmitted diseases (STDs). The overall HIV prevalence was 11.5% (95% CI: 10.2-12.8). Other prevalent STDs included gonorrhea (4.2%), trichomoniasis (14.3%), candidiasis (11.5%), and syphilis (2.5%). HIV seroprevalence was significantly lower among younger women and women in nonpolygamous marriages. HIV risk increased with both women's education and male partner's education. Number of sex partners in the last 5 years was positively associated with HIV risk; however, among HIV-seropositive women, the median number of sexual partners was only two. For married women with only a single partner, their risk increased significantly if their husbands had other partners. The risk of HIV infection was higher among subjects with STDs, although only significantly so for gonorrhea (OR 1.95, 95% CI: 1.10-3.45). After controlling for known and potential risk factors, the risk of HIV infection was significantly increased among women who had ever used an intrauterine device (IUD) (OR 2.50, 95% CI: 1.35-4.64). Use of other contraceptives, including oral contraceptives, was not significantly associated with HIV infection. Our findings confirm that HIV and STDs are a major public health problem among women in Dar-es-Salaam.(ABSTRACT TRUNCATED AT 250 WORDS)