HLA-B27 is strongly associated with ankylosing spondylitis (AS). We analyzed the relationship between structure, peptide specificity, folding, and stability of the seven major HLA-B27 subtypes to determine the role of their constitutive peptidomes in the pathogenicity of this molecule. Identification of large numbers of ligands allowed us to define the differences among subtype-bound peptidomes and to elucidate the peptide features associated with AS and molecular stability. The peptides identified only in AS-associated or high thermostability subtypes with identical A and B pockets were longer and had bulkier and more diverse C-terminal residues than those found only among non-AS-associated/lower-thermostability subtypes. Peptides sequenced from all AS-associated subtypes and not from non-AS-associated ones, thus strictly correlating with disease, were very rare. Residue 116 was critical in determining peptide binding, thermodynamic properties, and folding, thus emerging as a key feature that unified HLA-B27 biology. HLA-B27 ligands were better suited to TAP transport than their N-terminal precursors, and ASassociated subtype ligands were better than those from non-AS-associated subtypes, suggesting a particular capacity of AS-associated subtypes to bind epitopes directly produced in the cytosol. Peptides identified only from ASassociated/high-thermostability subtypes showed a higher frequency of ERAP1-resistant N-terminal residues than ligands found only in non-AS-associated/low-thermostability subtypes, reflecting a more pronounced effect of ERAP1 on the former group. Our results reveal the basis for the relationship between peptide specificity and other features of HLA-B27, provide a unified view of HLA-B27 biology and pathogenicity, and suggest a larger influence of ERAP1 polymorphism on AS-associated than non-AS-associated subtypes. Molecular & Cellular