Background: Genetic polymorphisms in the Endoplasmic reticulum aminopeptidase (ERAP) 2 gene has been attributed with the Ankylosing spondylitis (AS) etiopathogenesis. Here we assessed the association of ERAP2 gene single nucleotide polymorphisms (SNPs) with AS predisposition in Iranian patients and determined their effect on the inflammatory state of the patients.Methods: For genotyping of rs2548538, rs2287988, and rs17408150 SNPs using Real-time allelic discrimination approach, DNA was extracted from the whole blood of 250 AS patients and 250 healthy subjects. RNA of the peripheral blood mononuclear cells (PBMCs) was separated, cDNA was synthesized, and transcriptional levels of cytokines, including interleukin (IL)-17A, IL-23, IL-10, and transforming growth factor (TGF)-β were measured. Enzyme-linked immunosorbent assay (ELISA) was used to measure the serum concentration on the cytokines.Results: Three ERAP2 gene SNPs were not associated significantly with AS risk. Nonetheless, rs2287988 and rs17408150 SNPs showed statistically significant association with susceptibility to the disease in those AS subjects who were positive to Human leukocyte antigen (HLA)-B27. Transcriptional level and serum concentration of IL-17A and IL-23 were higher, while those of IL-10 were lower in both AS patients and HLA-B27 positive patient group relative to control group. Nevertheless, ERAP2 gene SNPs in the HLA-B27 positive AS patients did not affect the transcriptional level and serum concentration of cytokines.Conclusions: ERAP2 gene rs2287988 and rs17408150 SNP are associated with susceptibility to AS, but they probably are not determining the levels of IL-17A, IL-23, and IL-10 in this disease.