To investigate the phylogenetic and therapeutic implications of the genetic divergence in the dihydrofolate reductase (DHFR) and dihydropteroate synthase (DHPS) genes among different Pneumocystis carinii strains, these 2 genes in P. carinii obtained from 7 different host species were sequenced. Pairwise comparison of the DHPS sequences demonstrated 6%-24% and 6%-30% divergence in the nucleotide and deduced amino acid sequences, respectively. The DHFR gene was even more divergent, with differences of 15%-34% and 18%-42% in the nucleotide and deduced amino acid sequences, respectively. Phylogenetic analysis of DHFR and DHPS sequences revealed that all P. carinii strains were confined within a distinct group that was closely related to ascomycete fungi and that human-derived P. carinii was most closely related to monkey-derived P. carinii. Recognizing the substantial differences in the DHFR and DHPS genes among P. carinii from different host species has important implications for drug discovery and the development of new diagnostic methods.