B*2704 and B*2706 are closely related HLA-B27 subtypes of which the former but not the latter is associated to ankylosing spondylitis. Their peptide specificity relative to other disease-associated subtypes was analyzed by testing binding of self-peptides naturally presented by B*2705 or B*2702, and synthetic analogs, to B*2704, B*2706, and site-specific mutants mimicking their changes. Peptides with basic, aliphatic or aromatic C-terminal residues bound to B*2705 with similar affinity. In B*2704 C-terminal aliphatic/ aromatic residues were preferred. B*2706 discriminated drastically between polar and nonpolar C-terminal residues, showing strong preference for Leu and Phe, and less than B*2704 for basic and Tyr residues. Loss of single acidic charges (D > S77, D > Y116) increased preference for C-terminal Leu and Phe, but allowed efficient binding of peptides with basic residues or Tyr. Their gain (V > E152, H > D114) maintained wide C-terminal specificity, but severely impaired binding, presumably by disrupting interactions with internal peptide residues. This was compensated by Y116 in the double D114Y116 mutant. The specificity of B*2704 and B*2706 was explained only partially by the separate effects of single mutations, indicating that novel properties arise from concomitant changes at various positions. For instance, specificity of B*2706 for nonpolar C-terminal residues required simultaneous removal of Asp77 and Asp116. B*2706 differed from B*2705, B*2702, and B*2704 in its lower suitability for C-terminal Tyr, suggesting that this feature might be relevant for HLA-B27 association to spondyloarthropathy.