The spondyloarthropathies are associated by an unknown mechanism with HLA-B27 and certain bacteria. HLA-B27 shares sequence with proteins from enteric bacteria. The B*2705 sequence contains a nonapeptide, LRRYLENGK, predicted to bind in the binding cleft of B27. Some nonapeptides from enteric organisms that share sequence with this nonapeptide of B27 also bind B27. These observations suggest an unappreciated mechanism for autoimmunity that may operate in the B27-associated spondyloarthropathies involving peptides bound to and derived from histocompatibility alleles.