Impaired lung function is associated with both the prevalence and incidence of SpA, with the strongest effects observed in axSpA and AS.