To assess the risk factors for esophageal candidiasis (EC), a cohort study and a case-control study were conducted using 1,368 French patients who were already participating in the Delta trial (which compared different types of antiretroviral therapy in HIV-infected patients) and who had no previous history of EC. During a median follow-up period of 19 months, 87 (6%) patients developed EC. The results of the cohort study showed an increased risk of EC associated with a low baseline CD4+ cell count (P<0.0001), a high baseline plasma HIV RNA level (P < 0.0001) and prior zidovudine therapy (P = 0.02) at entry to the study. The case-control study revealed an increased risk of EC in patients with a recent low CD4+ cell count (P < 0.0002), recent antibacterial chemotherapy (P = 0.01) and oral candidiasis (P < 0.05). Cotrimoxazole prophylaxis also increased the risk of EC (P = 0.04) in the case-control study.