To evaluate whether the detection of Toxoplasma gondii DNA in CSF could contribute to the differential diagnosis of AIDS-related focal brain lesions, CSF samples from 88 HIV-infected patients (56 with focal brain lesions and 32 without) were tested prospectively by a nested PCR for the B1 gene of T. gondii. The assay had a detection limit of 10 trophozoite equivalents. Six of 18 patients with toxoplasmic encephalitis, but none of the 70 patients with other disorders, were PCR-positive (33.3% sensitivity and 100% specificity). Considering only those patients with cerebral toxoplasmosis from whom CSF was collected before or during the first week of antitoxoplasmic therapy, sensitivity rose to 50%. This was higher than the sensitivity in patients whose CSF was collected after the first week of treatment (odds ratio (OR) of 7.0; 95% CI: 0.46-218.2). The administration of antitoxoplasmic prophylaxis did not affect the PCR results. Patients with a poor response to therapy had a higher probability of detectable T. gondii DNA in their CSF (OR of 5.0; 95% CI: 0.37-86.6). All patients with other central nervous system disorders were PCR-negative. Despite the moderate sensitivity, the high specificity and positive predictive value (100%) make this assay a useful tool in the differential diagnosis of AIDS-related focal brain lesions as part of a series of CSF and neuroradiological examinations.