Ankylosing spondylitis (AS) is a chronic inflammatory rheumatic disease. Although two prior studies detected increased prevalence ratios of cerebrovascular disease among AS patients, the results of the two studies investigating AS and stroke are in conflict. Therefore, the present cohort study set out to estimate the risk of subsequent stroke in AS patients compared with matched controls using a population-based dataset in Taiwan. This investigation analyzed administrative claims data sourced from the Taiwan National Health Insurance Database. Our study consisted of a study cohort comprising 1,479 AS patients and a comparison cohort of 5,916 subjects without AS. Cox proportional hazards regressions were performed to estimate the risk of subsequent stroke during the follow-up period. We also conducted additional analyses investigating the risk of subsequent stroke by gender and pharmaceutical prescription. After adjusting for chronic lower respiratory diseases, type 2 diabetes mellitus, hypertension, hyperlipidemia, renal disease, coronary heart disease, atrial fibrillation, income, and urbanization, compared with comparison patients, the hazard ratio for subsequent stroke among patients with AS was 2.3 (95 % CI 1.9-2.8). We also stratified our results by both gender and pharmaceutical prescription, but did not find a statistically significant difference for the risk of subsequent stroke either between men and women, or between AS patients taking various pharmaceutical regimens and the overall AS population. This is the first study to report an increased hazard ratio for subsequent stroke among AS patients when compared with matched comparison patients without AS.