Major histocompatibility complex class II DQA and DQB genes have been shown to be under positive selection in certain mammalian species but not in others, fuelling a debate about how their polymorphism has evolved. In this study, we have analysed whether polymorphism in the peptide-binding region (PBR) of DQA (190 sequences, 11 species) and DQB (209 sequences, 7 species) molecules is positively selected by using both approximate (Nei-Gojobori, Li-Wu-Luo and Pamilo-Bianchi-Li) and maximum-likelihood methods. The results obtained with approximate methods were rather inconsistent for DQA, probably due to the high inaccuracy with which d S (PBR) is estimated, whereas evidence of positive selection was observed for most of the DQB PBR sequences. A parallel analysis with CodeML allowed us to demonstrate, in a very consistent way, the occurrence of positive selection in the PBR-encoding region of both DQA and DQB genes. Moreover, we have identified several DQA (a47, a55, a56, a68, a69, a76 and a79) and DQB (b9, b26 and b57) codons that appear to be under positive selection in different, and often unrelated, mammalian species. Non-synonymous polymorphism at these sites has been evolutionarily conserved meaning that it might have functional consequences on peptide binding.