Natural variation in plant pathogens has an impact on food security and ecosystem health. The rice blast fungus Pyricularia oryzae, which limits rice production in all rice-growing areas, is structured into multiple lineages. Diversification and the maintenance of multiple rice blast lineages have been proposed to be due to separation in different areas and differential adaptation to rice subspecies. However, the precise world distribution of rice blast populations, and the factors controlling their presence and maintenance in the same geographic areas, remain largely unknown. We used genotyping data for 886 isolates from more than 185 locations in 51 countries to show that P. oryzae is structured into one recombining and three clonal lineages, each with broad geographic distributions. No evidence was found for admixture in clonal lineages, and crossing experiments revealed that female sterility and early postmating genetic incompatibilities acted as strong barriers to gene flow between these lineages. An analysis of climatic and geographic data indicated that the four lineages of P. oryzae were found in areas differing in terms of the prevailing environmental conditions and types of rice grown. Pathogenicity tests with representatives of the five main rice subspecies revealed differences in host range between pathogenic lineages, highlighting a contribution of specialization to niche separation between lineages, despite co-existence on the same host species. Our results demonstrate that the spread of a pathogen across heterogeneous habitats and divergent populations of a crop species can lead to niche separation and incipient speciation in the pathogen.