BackgroundPatients with ankylosing spondylitis (AS) have a higher prevalence of depression compared to the general population. Comorbid depression in AS likely has a multifactorial origin. While several disease-related and contextual factors have been associated with depressive symptoms in AS, a comprehensive model of their interrelations is currently lacking. Such a model could help understand the mechanisms leading to, or maintaining, depression in AS. The objectives of the current study were to determine which factors are associated with depressive symptoms in AS and to understand their underlying relationships.MethodsData from a cross-sectional survey-based multicentre study were used. Potential determinants included both contextual and disease-related factors. Depressive symptoms were assessed by the Hospital Anxiety and Depression Subscale (HADS-D). Direct and indirect associations between risk factors and the latent depressive symptom outcome were explored using structural equation modelling. A final model was selected based on model fit criteria and clinical plausibility.ResultsAmong 245 patients, median HADS-D score was 3 (interquartile range 1–6), and 44 patients (18%) had a HADS-D score ≥ 8, indicating possible depression. In the final model, contextual factors significantly associated with depressive symptoms were male gender, being employed, lower income, lower mastery and worse satisfaction with social role participation. Bath AS Disease Activity Index (BASDAI) was the only disease-related factor that was associated with depressive symptoms, acted only indirectly via mastery, and its standardized total effect on depressive symptoms was smaller than that of several contextual factors. Mastery had a central role in the path diagram and mediated the effects of BASDAI, income and satisfaction with social role participation on depressive symptoms. The final model explained 64% of the variance in the depression outcome.ConclusionsBoth contextual and disease-related factors are associated with depressive symptoms in AS. Mastery, the extent to which one feels in control over life and disease, has a key role in this process. Results support a relevance of self-efficacy in disease management and patient education. In order to improve patients’ mental health, research is warranted whether mastery and its relation with depression can be modified.