A prevalence of 12.8% for anti-HIV-1 and a prevalence of 16.8% for anti-syphilis antibodies was found in 359 gynaecological inpatients admitted in the Department of Gynaecology and Obstetrics, Muhimbili University College of Health Sciences from 1988 to 1990. The highest HIV prevalence (17.3%) was observed in the youngest age group (14-20 years), whereas the highest syphilis prevalence (22.2%) was found in the oldest age group (> 45 years). Infections with HIV and syphilis were both significantly associated with variables related to sexual behaviour, such as marital status, age at first intercourse and number of sexual partners in the past ten years. After adjustment for these common risk variables linked to sexual behaviour, syphilis infection was still associated with a more than twofold higher risk of HIV infection (odds ratio (OR) = 2.60, p = 0.02) and trichomonas vaginalis infection with a nearly threefold higher risk (OR = 2.96, p < 0.001). These data characterize patients at risk for HIV infection among inpatients of a gynaecological department in East Africa, and indicate that effective measures to prevent sexually transmitted disease may reduce HIV transmission.