Female birds often copulate outside the pair-bond to produce broods of mixed paternity, but despite much recent attention the adaptive significance of this behaviour remains elusive. Although several studies support the idea that extra-pair copulations (EPCs) allow females to obtain ‘good genes’ for their offspring, many others have found no relationship between female mating fidelity and traits likely to reflect male quality. A corollary to the good genes hypothesis proposes that females do use EPCs to increase the quality of young, but it is the interaction between maternal and paternal genomes — and not male quality per se — that is the target of female choice. We tested this ‘genetic compatibility’ hypothesis in a free-living population of Savannah sparrows (Passerculus sandwichensis) by determining whether females mated nonrandomly with respect to the major histocompatibility complex (Mhc). During both the 1994 and 1995 breeding seasons, female yearlings (but not older birds) avoided pairing with Mhc-similar males (P < 0.005). The Mhc similarity between mates also predicted the occurrence of extra-pair young in first broods (P < 0.007) and covaried with estimates of genome-wide levels of similarity derived from multilocus DNA fingerprinting profiles (P = 0.007). The overall genetic similarity between adults tended to predict female mating fidelity, but with less precision than their Mhc similarity (P = 0.09). In contrast, females appeared insensitive to the size, weight or age of males, none of which explained variation in female mating fidelity. Taken together, these results are consistent with the hypothesis that females sought complementary genes for their offspring and suggest either that the benefits of heterozygosity (at the Mhc) drive female mating patterns or that the avoidance of inbreeding is an ultimate cause of social and genetic mate choice in Savannah sparrows.