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 dS (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 (α47, α55, α56, α68, α69, α76 and α79) and DQB (β9, β26 and β57) 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.