Matings between close relatives often reduce the fitness of offspring, probably because homozygosity leads to the expression of recessive deleterious alleles1,2,3,4,5. Studies of several animals have shown that reproductive success is lower when genetic similarity between parents is high4,5,6,7, and that survival and other measures of fitness increase with individual levels of genetic diversity8,9,10,11. These studies indicate that natural selection may favour the avoidance of matings with genetically similar individuals. But constraints on social mate choice, such as a lack of alternatives, can lead to pairing with genetically similar mates. In such cases, it has been suggested that females may seek extra-pair copulations with less related males4, but the evidence is weak or lacking4,5. Here we report a strong positive relationship between the genetic similarity of social pair members and the occurrence of extra-pair paternity and maternity (‘quasi-parasitism’) in three species of shorebirds. We propose that extra-pair parentage may represent adaptive behavioural strategies to avoid the negative effects of pairing with a genetically similar mate.