The polymerase chain reaction (PCR) technique was compared with Wright-Giemsa (WG), Gomori methenamine silver (GMS) stains and an immunofluorescence assay (IFA) for detection of Pneumocystis carinii in immuno-compromised patients. Specimens of 21 bronchoalveolar lavages (BAL) and 139 sputum samples, were obtained from 157 patients (38 with AIDS and 119 with HIV) from four hospitals in Khon Kaen, Thailand. A true positive required at least two positives by techniques considered gold standard tests. Eleven (52.38%) BAL and 13 (9.35%) sputum specimens were positive. PCR produced the highest sensitivity and negative predictive values for the BAL (100% for each) vs. sputum samples at 84.62 and 98.41 percent, respectively. The specificity of PCR was 90% and 98.41% for BAL and sputum samples, respectively. We suggest PCR is an important tool for the epidemiological study of P. carinii in high-risk individuals.