The maintenance of genetic variation and sex despite its costs has long puzzled biologists. A popular idea, the Red Queen Theory, is that under rapid antagonistic coevolution between hosts and their parasites, the formation of new rare host genotypes through sex can be advantageous as it creates host genotypes to which the prevailing parasite is not adapted. For host-parasite coevolution to lead to an ongoing advantage for rare genotypes, parasites should infect specific host genotypes and hosts should resist specific parasite genotypes. The most prominent genetics capturing such specificity are matching-allele models (MAMs), which have the key feature that resistance for two parasite genotypes can reverse by switching one allele at one host locus. Despite the lack of empirical support, MAMs have played a central role in the theoretical development of antagonistic coevolution, local adaptation, speciation, and sexual selection. Using genetic crosses, we show that resistance of the crustacean Daphnia magna against the parasitic bacterium Pasteuria ramosa follows a MAM. Simulation results show that the observed genetics can explain the maintenance of genetic variation and contribute to the maintenance of sex in the facultatively sexual host as predicted by the Red Queen Theory.