Purpose: This study aimed to construct and test a hypothetical model to explain the predictive factors and causal pathways for exercise levels in patients with ankylosing spondylitis based on the self-determination theory. A conceptual framework was constructed assuming that autonomy support by health care providers would satisfy the three basic psychological needs of patients, which would increase their autonomous motivation for exercise, resulting in its initiation and continuation. Methods: This cross-sectional study included 221 patients with ankylosing spondylitis who were visiting rheumatology clinics in two tertiary hospitals. Health Care Climate Questionnaire-exercise regularly, Basic Psychological Needs Satisfaction scale, Behavior Regulation in Exercise Questionnaire-2, and exercise level were used to collect data. Results: The fitness of the hypothetical model met the recommended level (𝛘2/df ≤ 3, SRMR ≤ .08, RMSEA ≤ .08, GFI ≥ .90, AGFI ≥ .85, NFI ≥ .90, TLI ≥ .90, CFI ≥ .90). The model effect analysis revealed that autonomy support by health care providers had a positive effect on patients' autonomy, competence, relatedness, autonomous motivation, and exercise level. Competence and relatedness had positive effects on autonomous motivation and exercise level, respectively. Autonomous motivation had a positive effect on exercise level. Conclusion: The predictive factors of exercise level in patients with ankylosing spondylitis were autonomous motivation, health care providers' autonomy support, competence, and relatedness. Considering these factors, we recommend the development of an effective program for improving exercise levels in these patients.