The occurrence of toxoplasmic encephalitis (TE) was studied among 19,598 and 17,016 patients enrolled in the French Hospital Database on human immunodeficiency virus whose CD4 cell counts decreased to < or =200x10(6) cells/L before (1992-1995) or after (1996-1998) the availability of highly active antiretroviral therapy, respectively. The incidence of TE decreased from 3.9 cases per 100 person-years in the first period (95% confidence interval [CI], 3.7-4.1) to 1.0 cases per 100 person-years in the second period (95% CI, 0.9-1.1). After adjustment for known risk factors for TE, patients who received cotrimoxazole prophylaxis had a lower risk of TE (adjusted relative hazard, 0.6 and 0.5, respectively, for the first and second periods; P < .001). For patients treated with cotrimoxazole at inclusion, discontinuation of cotrimoxazole increased the risk of TE in both periods (adjusted relative hazard, 4.8 and 4.2, respectively; P < .001). Among patients whose CD4 cell counts increased to > 200 x 10(6) cells/L while undergoing highly active antiretroviral therapy, the incidence of TE was 0.1 cases per 100 person-years (95% CI, 0.0-0.2) and was not increased by discontinuation of cotrimoxazole.