Polymorphic genes of the major histocompatibility complex (MHC) are regarded as essential genes for individual fitness under conditions of natural and sexual selection. To test this hypothesis, we investigated the ultimate individual fitness trait — that of reproductive success. We used three-spined sticklebacks (Gasterosteus aculeatus) in seminatural enclosures, located in natural breeding areas where the experimental fish had been caught. During their reproductive period, fish were exposed continuously to their natural sympatric parasites. By genotyping almost 4000 eggs with nine microsatellites, we determined parenthood and inferred female mating decision. We found that with reference to their own MHC profile, female sticklebacks preferred to mate with males sharing an intermediate MHC diversity. In addition, males with a specific MHC haplotype were bigger and better at fighting a common parasite (Gyrodactylus sp.). This translated directly into Darwinian fitness since fish harbouring this specific MHC haplotype were more likely to be chosen and had a higher reproductive output. We conclude that females also based their mating decision on a specific MHC haplotype conferring resistance against a common parasite. This identifies and supports 'good genes'. We argue that such an interaction between host and parasite driving assortative mating is not only a prerequisite for negative frequency-dependent selection — a potential mechanism to explain the maintenance of MHC polymorphism, but also potentially speciation.