We investigated the genetic population structure of the sexually transmitted plant pathogen, the fungus Microbotryum violaceum, on the two closely related host species Silene latifolia and S. dioica using microsatellite markers. We found strong deviations from Hardy–Weinberg expectations, with significant heterozygote deficiency in almost all populations. Fungal strains from the two host species were differentiated, and these host races differed in amount of variation within populations and differentiation among populations. Anther smut from S. latifolia harboured significantly less microsatellite diversity and were more genetically differentiated from each other than those from S. dioica. Small effective population sizes, rapid population turnover, and less gene flow among populations could lead to this higher population differentiation and lower within population genetic diversity for anther smut populations on S. latifolia than on S. dioica. These results are in concordance with host ecology because S. latifolia grows in more disturbed habitats than S. dioica and may provide a shorter-lived host environment.