© 2017 Published by the BMJ Publishing Group Limited. Objectives Tumour necrosis factor-á inhibitor (TNFi) treatment has been shown to reduce the rates of anterior uveitis (AU) in patients with ankylosing spondylitis (AS). Our objective was to compare the effect of adalimumab (ADA), etanercept (ETN) and infliximab (IFX) on AU occurrence in AS, using real-world data. Methods Patients with AS starting ADA, ETN or IFX as their first TNFi from January 2003 to December 2010 were extracted from the Swedish Rheumatology Quality Register. AU rates, based on visits to an ophthalmologist with International Classification of Diseases 10 codes for AU, were obtained by linkage to the Swedish National Patient Register. For each TNFi, AU rates 2 years before TNFi start and for the first 2 years on TNFi treatment were compared. In the subgroup of patients who were AU-free during the 2 years before TNFi start, we also compared the risk of a first AU event. Results 1365 patients with AS were included (406 ADA, 354 ETN, 605 IFX). Compared with pretreatment rates, we noted a reduction in overall AU rates for ADA and IFX, and an increase for ETN. The adjusted HRs for AU in 1127 patients who were free of AU in the last 2 years before TNFi start were significantly higher for ETN versus ADA (HR: 3.86 95% CI 1.85 to 8.06) and ETN versus IFX (HR: 1.99, 95% CI 1.23 to 3.22), while the HR for IFX versus ADA was not statistically significant. Conclusions The results suggest differences in effect on AU risk between ADA, ETN and IFX, with a clear advantage for ADA/IFX over ETN.