Spondyloarthritis (SpA) defines a group of interrelated diseases, including ankylosing spondylitis (AS), psoriatic arthritis, reactive arthritis, enteropathic-related spondylitis and arthritis, and undifferentiated SpA. The clinical presentation of SpA is heterogeneous, and no single shared distinguishing feature exists for the conditions comprising SpA; in daily practice, diagnosis is usually made on the basis of a combination of symptoms, the findings of physical examination, imaging and laboratory investigations. Several classification criteria have been developed for AS and SpA, which are useful in a research setting but cannot be automatically applied to the diagnosis of individual patients. Currently, MRI is the most sensitive imaging modality available for detection of sacroiliitis, often enabling detection of axial inflammation long before structural lesions are observed radiographically, thus facilitating early diagnosis of axial SpA. However, MRI will never capture all facets of SpA and the expert opinion of a rheumatologist will remain the crucial step in recognition of this disease. In this Review, we discuss diagnosis and classification of AS and SpA, and highlight how MRI might facilitate both processes.