In a case-control study, prophylaxis with cotrimoxazole for toxoplasmic encephalitis (TE) in HIV-infected patients was evaluated. Cotrimoxazole had been given as PCP prophylaxis. 20 patients with TE were identified and 72 matching control cases were found. All patients had IgG-antibodies to Toxoplasma gondii and CD4+ T-cell counts < or = 100/microliter. The use and duration of cotrimoxazole prophylaxis were recorded. It was found that among the patients with TE, none had used cotrimoxazole for > 70% of the observation time, and that the 1-y incidence was 0% in the control group vs. 41% in those patients without sufficient cotrimoxazole use. The conclusion is that cotrimoxazole is effective as primary prophylaxis for TE, even in a dose of 480 mg daily.