Pneumocystis fungi are opportunistic parasites of mammalian lungs whose evolution, ecology and host specificity in natural host populations remain poorly understood and controversial. Using an extensive collection of 731 lung samples from 27 rodent species sampled in five Southeast Asian countries, and nested PCR amplification of mitochondrial and nuclear genes, we investigated the host specificity and genetic structure of Pneumocystis lineages infecting wild rodents. We also identified the rodent species playing a central role in the transmission of these parasites using network analysis and centrality measurement and we characterized the environmental conditions allowing Pneumocystis infection in Southeast Asia using generalized linear mixed models. Building upon an unprecedented Pneumocystis sampling from numerous rodent species belonging to closely related genera, our findings provide compelling evidence that the host specificity of Pneumocystis lineages infecting rodents is not restricted to a single host species or genus as often presented in the literature but it encompasses much higher taxonomic levels and more distantly related rodent host species. The phylogenetic species status at both mitochondrial and nuclear genetic markers of at least three new Pneumocystis lineages, highly divergent from Pneumocystis species currently described, is also suggested by our data. Our models show that the probability of Pneumocystis infection in rodent hosts is positively correlated to environmental variables reflecting habitat fragmentation and landscape patchiness. Synanthropic and habitat-generalist rodents belonging to the Rattus, Sundamys and Bandicota genera played a role of bridge host species for Pneumocystis spreading in these heterogeneous habitats, where they can reach high population densities. These are critical findings improving our understanding of the ecology of these enigmatic parasites and the role played by cospeciation and host switches in their evolution. Our results also confirmed the role of land-use change and habitat fragmentation in parasite amplification and spillover in rodents.