Acute anterior uveitis (AAU) involves inflammation of the iris and ciliary body of the eye. It occurs both in isolation and as a complication of ankylosing spondylitis (AS). It is strongly associated with HLA-B*27, but previous studies have suggested that further genetic factors may confer additional risk. We sought to investigate this using the Illumina Exomechip microarray, to compare 1504 cases with AS and AAU, 1805 with AS but no AAU and 21 133 healthy controls. We also used a heterogeneity test to test the differences in effect size between AS with AAU and AS without AAU. In the analysis comparing AS+AAU+ cases versus controls, HLA-B*27 and HLA-A*02:01 were significantly associated with the presence of AAU (P<10(-300) and P=6 × 10(-8), respectively). Secondary independent association with PSORS1C3 (P=4.7 × 10(-5)) and TAP2 (P=1.1 × 10(-5)) were observed in the major histocompatibility complex. There was a new suggestive association with a low-frequency variant at zinc-finger protein 154 in the AS without AAU versus control analysis (zinc-finger protein 154 (ZNF154), P=2.2 × 10(-6)). Heterogeneity testing showed that rs30187 in ERAP1 has a larger effect on AAU compared with that in AS alone. These findings also suggest that variants in ERAP1 have a differential impact on the risk of AAU when compared with AS, and hence the genetic risk for AAU differs from AS.Genes and Immunity advance online publication, 26 November 2015; doi:10.1038/gene.2015.49.