We have evaluated a PCR technique using primers based on Pneumocystis carinii major surface glycoprotein (MSG) genes, a multicopy gene family, for utility in detection of P. carinii in BAL and oropharyngeal samples obtained from immunosuppressed patients. These primers were able to detect P. carinii DNA in as little as 16 fg of genomic DNA. PCR using MSG primers detected P. carinii DNA in 7 smear-positive BAL samples (100% sensitivity), and found no P. carinii DNA in 12 smear-negative BAL samples (100% specificity). Mitochondrial ribosomal RNA (mrRNA) primers, commonly used in PCR studies of PCP, detected P. carinii in six of seven positive samples (85.7% sensitivity) and none of 12 were negative samples (100% specificity). Diagnosis of PCP by amplification of 81 oropharyngeal samples using MSG primers had a 50% sensitivity (4/8) and 96% specificity (70/73). PCR with mrRNA primers was 37.5% sensitive (3/8) and 100% specific (73/73). All three false-positive MSG results showed a very low intensity on Southern hybridization. PCR using MSG gene primers should prove valuable in the diagnosis of PCP.