Pneumocystis species are opportunistic mammalian pathogens that cause severe pneumonia in immunocompromised individuals. These fungi are highly host specific and uncultivable in vitro Human Pneumocystis infections present major challenges because of a limited therapeutic arsenal and the rise of drug resistance. To investigate the diversity and demographic history of natural populations of Pneumocystis infecting humans, rats, and mice, we performed whole-genome and large-scale multilocus sequencing of infected tissues collected in various geographic locations. Here, we detected reduced levels of recombination and variations in historical demography, which shape the global population structures. We report estimates of evolutionary rates, levels of genetic diversity, and population sizes. Molecular clock estimates indicate that Pneumocystis species diverged before their hosts, while the asynchronous timing of population declines suggests host shifts. Our results have uncovered complex patterns of genetic variation influenced by multiple factors that shaped the adaptation of Pneumocystis populations during their spread across mammals.IMPORTANCE Understanding how natural pathogen populations evolve and identifying the determinants of genetic variation are central issues in evolutionary biology. Pneumocystis, a fungal pathogen which infects mammals exclusively, provides opportunities to explore these issues. In humans, Pneumocystis can cause a life-threatening pneumonia in immunosuppressed individuals. In analysis of different Pneumocystis species infecting humans, rats, and mice, we found that there are high infection rates and that natural populations maintain a high level of genetic variation despite low levels of recombination. We found no evidence of population structuring by geography. Our comparisons of the times of divergence of these species to their respective hosts suggest that Pneumocystis may have undergone recent host shifts. The results demonstrate that Pneumocystis strains are widely disseminated geographically and provide a new understanding of the evolution of these pathogens.