Detection of Pneumocystis carinii by the polymerase chain reaction (PCR), based on the thymidylate synthase (TS) gene of rat P. carinii, is a specific and sensitive method for the detection of the parasite in respiratory samples. However, the use of the method is limited by a laborious phenol-chloroform DNA extraction method and an expensive and time-consuming hybridization procedure. For routine clinical samples, DNA preparation can be simplified and hybridization substituted by a nested PCR technique. Such a modified PCR procedure, based on the TS gene of P. carinii, was evaluated on 190 induced sputum samples from 50 immunosuppressed patients, infected with human immunodeficiency virus (HIV), with and without symptoms of P. carinii pneumonia (PCP). The PCR assay, preceded by a rapid DNA preparation (Wizard DNA Clean-up), detected P. carinii-DNA in 13/15 sputa containing parasites as seen by microscopy using immunocytochemical (IFL) staining, and in 10 additional sputum samples lacking demonstrable parasites by microscopy. These samples are to be considered as 'true' positives, since all but 2 were from patients, who developed a PCP within 1 year. We conclude that the nested PCR assay is more sensitive than IFL for the detection of P. carinii in AIDS patients, prior to the debut of PCP symptoms.