What Causes Ankylosing Spondylitis? Key Risk Factors

Ankylosing spondylitis is caused by a combination of genetic susceptibility, immune system malfunction, and environmental triggers. No single factor is responsible. The strongest known risk factor is a gene called HLA-B27, carried by over 85% of people with the condition, but most people who have this gene never develop ankylosing spondylitis. That gap between genetic risk and actual disease points to a complex chain of causes that researchers are still piecing together.

The HLA-B27 Gene and Genetic Risk

The gene most closely tied to ankylosing spondylitis is HLA-B27, which codes for a protein on the surface of your cells that helps the immune system distinguish your own tissue from foreign invaders. Over 85% of people with ankylosing spondylitis carry this gene. But in the general population, HLA-B27 prevalence varies widely by ethnicity: roughly 6 to 8% in white Europeans, 4 to 8% in Chinese populations, and as low as 1% in Japanese populations. The vast majority of HLA-B27 carriers never develop the disease, which means carrying the gene is necessary for most cases but far from sufficient on its own.

Genome-wide association studies have identified over 100 additional genes linked to the condition. The most significant non-HLA genes include IL23R (involved in a key inflammatory signaling pathway), ERAP1 (which helps process proteins for immune recognition), and RUNX3 (a regulator of immune cell development). Many of these genes cluster around the same inflammatory pathway, suggesting the disease arises when multiple genetic vulnerabilities stack on top of each other.

Family History Dramatically Raises Risk

Ankylosing spondylitis runs strongly in families. A large Swedish study found that 11.1% of people with the condition had at least one affected relative, compared to just 0.6% of the general population. Having one family member with the disease raised the odds roughly 19-fold. Having more than one affected relative pushed the odds even higher, to about 68 times the baseline risk. This level of familial clustering is among the highest for any inflammatory disease, reinforcing that genetics play a dominant role in who develops it.

How the Immune System Drives the Disease

The actual damage in ankylosing spondylitis comes from your immune system attacking specific structures in your body, particularly the entheses. These are the points where tendons and ligaments anchor into bone. Inflammation at these sites is the hallmark that distinguishes ankylosing spondylitis from other forms of arthritis.

The central driver of this inflammation is a signaling loop between two immune molecules: IL-23 and IL-17. Normally, these molecules help your body fight infections and maintain the protective barriers of your gut and skin. In ankylosing spondylitis, this pathway becomes chronically overactivated. Immune cells at the enthesis produce excess IL-17, which triggers ongoing inflammation. Researchers have confirmed that people with the disease have elevated IL-17 levels in their blood and higher IL-23 activity in their immune cells.

What makes the disease especially destructive is what happens after the inflammation takes hold. A related molecule, IL-22, drives the growth of new bone at inflamed sites. Over time, this abnormal bone formation creates bony bridges between vertebrae called syndesmophytes. As these bridges accumulate, sections of the spine can fuse together, reducing flexibility and, in severe cases, locking the spine into a fixed position. This cycle of inflammation followed by bone overgrowth is why early treatment focuses on interrupting the immune response before permanent structural changes occur.

The Gut Connection

Up to 70% of people with ankylosing spondylitis show signs of microscopic gut inflammation, even without digestive symptoms. Research into the gut microbiome has revealed that people with the disease tend to have less diverse bacterial communities in their intestines compared to healthy individuals. Specifically, they carry higher levels of Bacteroides and Streptococcus bacteria, and lower levels of Faecalibacterium prausnitzii, a species that produces butyrate, a compound with strong anti-inflammatory effects.

This microbial imbalance appears to shift the gut toward a more pro-inflammatory state. Inflammation-associated bacterial pathways, including those involved in producing lipopolysaccharides (bacterial toxins that activate the immune system), are more active in people with the condition. The theory is that a disrupted gut barrier allows immune activation that eventually reaches the spine and joints through the IL-23/IL-17 pathway. The connection between HLA-B27, gut bacteria, and spinal inflammation is one of the most active areas of research in understanding the disease.

Mechanical Stress at the Enthesis

Physical forces on the body also appear to play a role. Entheses are naturally high-stress zones because they concentrate the force of large muscles down onto small contact points on bone. Researchers recognized decades ago that repetitive stress and microdamage at these sites could trigger an inflammatory response. Animal studies have shown that mechanical stress alone, even without visible injury, can initiate the kind of joint inflammation seen in ankylosing spondylitis when the right genetic background is present.

Normal aging produces small amounts of microdamage at entheses in most people. In someone with a genetically primed immune system, this routine wear may be enough to set off a disproportionate inflammatory response. Complicating matters, many of the cellular pathways that respond to mechanical stress overlap with immune signaling pathways, making it difficult to separate the mechanical trigger from the immune overreaction.

Who Gets Ankylosing Spondylitis

Symptoms most commonly begin in the mid-20s. People who carry HLA-B27 tend to develop symptoms earlier, around age 25 on average, while those without the gene average closer to 28. About 6 to 7% of cases begin in childhood (before age 16), and late onset after age 40 is uncommon but does occur, more often in people who are HLA-B27 negative.

Ankylosing spondylitis has historically been considered a male-dominated disease, with early studies reporting a 10:1 male-to-female ratio. That number has steadily fallen as diagnostic awareness improved. Current estimates put the ratio closer to 3:1 for the radiographic form of the disease, and recent data from Switzerland found the ratio approaching 1:1 when including earlier, non-radiographic stages. Women are more likely to be underdiagnosed or diagnosed late, partly because the disease can present differently, with more neck and peripheral joint involvement rather than the classic lower back pattern.

One of the most persistent challenges is diagnostic delay. On average, people wait 8 to 11 years between their first symptoms and receiving a diagnosis. The delay is longer for HLA-B27 negative patients (about 11 years) than for those who carry the gene (about 8.5 years), likely because clinicians are less likely to suspect the disease without that genetic marker. This gap means many people live with undiagnosed inflammatory back pain for years before getting appropriate treatment.