Ankylosing spondylitis (AS) is a common, highly heritable, inflammatory arthropathy. In addition to being strongly associated with HLA-B27, a further 13 genes have been robustly associated with the disease. These genes highlight the involvement of the IL-23 pathway in disease pathogenesis, and indicate overlaps between the pathogenesis of AS, and of inflammatory bowel disease. Genetic associations in B27-positive and -negative disease are similar, with the main exception of association with ERAP1, which is restricted in association to B27-positive cases. This restriction, and the known function of ERAP1 in peptide trimming prior to HLA Class I presentation, indicates that HLA-B27 is likely to operate in AS by a mechanism involving aberrant peptide handling. These advances point to several potential novel therapeutic approaches in AS.