A substantial body of theory indicates that parasites may mould the population genetic structure of their hosts, but few empirical studies have directly linked parasitism to genetic dynamics. We used molecular markers (allozymes) to investigate genotype frequency changes in a natural population of the crustacean Daphnia magna in relation to an epidemic of the bacterial pathogen Pasteuria ramosa. The population experienced a severe epidemic during the study period in which parasite prevalence reached 100% of the adult portion of the population. The parasite epidemic was associated with genetic change in the host population. Clonal diversity was observed to decrease as parasite prevalence increased in the population, and tests for differences in the clonal composition of the population before, during, and after the epidemic indicated that significant change had occurred. A laboratory infection experiment showed that the genotypes which were more common following the peak of the parasite epidemic were also the most resistant to parasite infection. Thus, this study provides an illustration of parasite-mediated selection in the wild.