In this study, the relation between osteoporosis and vitamin D and the disease activity in patients with ankylosing spondylitis (AS) was investigated. A hundred patients with AS and 58 healthy individuals were included in the study. In addition to the routine blood and urine tests, serum 25-(OH)D3, parathormone (PTH), C-reactive protein (CRP), erythrocyte sedimentation rate (ESR), total calcium, ionized calcium, and phosphorous levels of all participants were also measured. Bone mineral density (BMD) measurements were performed at the anterior-posterior and lateral lumbar and femur regions. Anterior-posterior and lateral thoracic and lumbosacral radiography was performed on all participants. The disease activity was evaluated by Bath Ankylosing Spondylitis Disease Activity Index (BASDAI), functional status by Bath Ankylosing Spondylitis Functional Index (BASFI), and mobility by Bath Ankylosing Spondylitis Metrology Index (BASMI). In the patient group, BMD values obtained from the lateral lumbar and femur regions and serum vitamin D levels were lower than the control group. A negative relation was determined between the lateral lumbar BMD values and ESR, CRP, and BASDAI scores of patients with AS. The ESR, CRP levels, and BASMI scores of the AS patients with osteoporosis were significantly higher, when compared to patients without osteoporosis. The negative correlation between serum 25-(OH)D3 level and ESR, CRP levels did not reach a statistically significant level in patients with AS; the positive correlation between PTH levels and ESR, and the negative correlation between CRP and BASDAI also did not reach a statistically significant level. Vitamin D deficiency in AS may indirectly lead to osteoporosis by causing an increase in the inflammatory activity. The present authors believe that it would be beneficial to monitorize vitamin D levels together with BMD measurements in order to determine the patients under osteoporosis risk.