The aim of this study was to identify new genetic variants associated with the severity of ankylosing spondylitis (AS). We sequenced the exome of eight patients diagnosed with AS, selected on the basis of the severity of their clinical parameters. We identified 27 variants in exons and regulatory regions. The contribution of candidate variants found to AS severity was validated by genotyping two Spanish cohorts consisting of 180 cases/300 controls and 419 cases/656 controls. Relationships of SNPs and clinical variables with the Bath Ankylosing Spondylitis Disease Activity and Functional Indices BASDAI and BASFI were analyzed. BASFI was standardized by adjusting for the duration of the disease since the appearance of the first symptoms. Refining the analysis of SNPs in the two cohorts, we found that the rs4819554 minor allele G in the promoter of the IL17RA gene was associated with AS (p<0.005). This variant was also associated with the BASFI score. Classifying AS patients by the severity of their functional status with respect to BASFI/disease duration of the 60th, 65th, 70th and 75th percentiles, we found the association increased from p60 to p75 (cohort 1: p<0.05 to p<0.01; cohort 2: p<0.01 to p<0.005). Our findings indicate a genetic role for the IL17/ILRA axis in the development of severe forms of AS.