Susceptibility to autoimmune diseases in the human population may be related to ERAP2 haplotypes that show evidence for natural selection in recent history because they are associated with resistance to infection as revealed by ancient genome studies. Here, ERAP2 is linked to infection.