Ankylosing spondylitis (AS) is a complex inflammatory disease that represents a major health problem both in Algeria and worldwide. Several lines of evidence support that genetic risk factors play a role in AS etiology and the CTLA4 gene has attracted a considerable attention. In this study, we were interested in evaluating the HLA-B27 frequency and in exploring the CTLA4 gene in a sample of the North African population. The dataset of the current study is composed of 81 patients with AS and 123 healthy controls. All samples were genotyped by TaqMan allelic discrimination assay. The genetic risk of the HLA-B27 specificity and the CTLA4/CT60 polymorphism were assessed by odds ratios (OR) with 95% confidence intervals (CI). High spondylitis risk was detected for HLA-B27 allele (OR= 14.62, p = 10 ) in addition to a significant association of the CT60*G allele (OR= 1.89, p = .002). After gender and age stratifications, the association of the CT60*G allele was still significant in females sample (OR= 2.10, p = .001) and when age up to 30 years (OR = 2.21, p = .008). Interestingly, the CT60*G allele revealed an increased spondylitis risk in the B27 negative group (OR= 2.81, p = .006). The present work showed in West Algerian population that the HLA-B27 antigen and the variation in the CTLA4 3'UTR region played an important role in the ankylosing spondylitis susceptibility. The heterogeneity of this disease is deduced by genetic difference found between B27+ and B27- groups.