Ankylosing spondylitis (AS) is a complex inflammatory condition within the spectrum of spondyloarthropathies (SpAs). HLA-B*27, IL-17, IL-23, and complex pathways drive AS progression. Microbiota, ERAPs, and TLRs also contribute to AS. This editorial delves into AS genetics, unraveling its molecular underpinnings. Since its discovery in 1973, HLA-B*27's association with AS has been extensively studied. About 90%-95% of AS patients carry HLA-B*27, yet only 1%-2% develop AS. This highly polymorphic allele includes subtypes like HLA-B*27:02, B*27:04, and B*27:05, showing variable associations across populations. Hypotheses include the "arthritogenic peptide" and "molecular mimicry," suggesting unique peptide presentation or microbial triggers. 1,2 Killer cell immunoglobulin-like receptors (KIRs) expressed by NK and T cells regulate immunity via inhibitory and activating signals and are key players in AS by engaging HLA-B*27. KIR-HLA variations may impact SpAs. Balancing activating and inhibitory KIR-HLA genotypes might influence AS susceptibility. KIR3DS1 allele frequency is elevated with HLA-B*27, while KIR3DL1, its inhibitory counterpart, is reduced in AS. Both interact with Bw4 epitope-bearing HLA-B alleles. B27 2 homodimers bind KIR3DL1, KIR3DL2, and LILRB2, impacting inflammatory responses (Figure 1A). 3 KIR3DL2 ligation inhibits IFNγ production and boosts IL-17, linking NK cells and CD4+ T cells to AS. 4 While KIR3DS1's ligand is not yet known, AS patients show elevated KIR3DL2 + CD4 + T cells producing IL-17, linking them to disease progression. This intricate interplay underscores KIR-HLA's role in shaping AS immunopathology.Crucial antigenic peptides, vital for immune recognition, undergo a refining via endoplasmic reticulum aminopeptidases (ERAP1 and ERAP2). ERAP1 fine-tunes peptides to 8-10 amino acids, while ERAP2 prefers shorter variants (7-8-mers). 5,6 ERAPs also influence cytokine receptor shedding, cytokine signaling, angiogenesis, and macrophage activation. 7 Their intricate association with AS involves HLA-B*27, evident in both positive and negative cases. ERAP1, combined with HLA-B*27, significantly influences familial AS risk. ERAP1 SNPs like rs30187, rs2287987, rs10050860, rs17482078, and rs27044 alter peptide interactions with HLA-B*27, shaping T-cell responses. 8 Some ERAP1 variants offer protection via peptide trimming. 9 Some