Between 5 and 10% of cases of ankylosing spondylitis (AS) are associated with inflammatory bowel disease (IBD), either Crohn's disease or ulcerative colitis. A much larger percentage of AS patients have subclinical gut inflammation manifested either by endoscopic findings or by histology. The association with HLA-B27 is less strong in IBD-associated AS than in idiopathic AS, and there is evidence for an association between gut inflammation in AS with the Crohn's-disease-related CARD15 mutations. Despite the different genetics, the immunopathology suggests common inflammatory pathways in gut and joint inflammation in AS, and in gut inflammation in AS and IBD. Although this observation is of interest to unravel the pathophysiology of the disease, systematic screening of AS patients by ileocolonoscopy is not indicated in the absence of gut symptomatology as only a small proportion of AS patients with subclinical gut inflammation will develop overt IBD over time. Treatment of AS associated with IBD with non-steroidal anti-inflammatory drugs (NSAIDs) is problematic because of concerns of potential re-activation of IBD by NSAIDs. Major advances have been made in recent years with the establishment of anti-tumour necrosis factor (TNF) therapy in AS, the other spondyloarthritides and IBD. Anti-TNF agents are of particular relevance to AS patients with concomitant IBD who are at risk of exacerbation of the underlying bowel disease when treated with NSAIDs. In IBD, infliximab, unlike etanercept, is effective in treating clinical symptoms, inducing and maintaining remission, and mucosal healing. Adalimumab appears to be effective in treating both AS and IBD; however, official approval is pending. Currently, infliximab is the drug of choice for the treatment of patients with active AS associated with IBD.