Ankylosing spondylitis (AS) is a common form of inflammatory spinal arthritis with a complex polygenic aetiology. Genome-wide association studies have identified more than 100 loci, including some involved in antigen presentation (HLA-B27, ERAP1, and ERAP2), some in Th17 responses (IL6R, IL23R, TYK2, and STAT3), and others in macrophages and T-cells (IL7R, CSF2, RUNX3, and GPR65). Such observations have already helped identify potential new therapies targeting IL-17 and GM-CSF. Most AS genetic associations are not in protein-coding sequences but lie in intergenic regions where their direct relationship to particular genes is difficult to assess. They most likely reflect functional polymorphisms concerned with cell type-specific regulation of gene expression. Clarifying the nature of these associations should help to understand the pathogenic pathways involved in AS better and suggest potential cellular and molecular targets for drug therapy. However, even identifying the precise mechanisms behind the extremely strong HLA-B27 association with AS has so far proved elusive. Polygenic risk scores (using all the known genetic associations with AS) can be effective for the diagnosis of AS, particularly where there is a relatively high pre-test probability of AS. Genetic prediction of disease outcomes and response to biologics is not currently practicable.