MedChunk
Medically reviewed

Ankylosing Spondylitis Causes and HLA-B27: Treatment Options

Learn what causes ankylosing spondylitis, how the HLA-B27 gene affects risk, what test results mean, and which treatments help manage pain and inflammation.

By Caleb Bennett Reviewed by Dr. Irene Medical review dateJan 10, 2024 13 min read

Ankylosing spondylitis (AS) is a long-term inflammatory disease that mainly affects the spine, and its exact cause is unknown. Genes, especially a gene variant called HLA-B27, can increase the risk, but having this variant does not mean a person will develop the disease. Treatment usually combines exercise, physical therapy, and medicines that reduce pain and inflammation.

What causes ankylosing spondylitis?

Ankylosing spondylitis is a type of inflammatory arthritis. It mainly affects the joints connecting the spine to the pelvis, known as the sacroiliac joints, although other parts of the spine and body can also be involved.

In AS, inflammation can cause ongoing pain and stiffness. Over time, some people develop new bone growth that connects parts of the spine. This process, called spinal fusion, can reduce flexibility and make everyday movements more difficult.

Researchers have not identified one single cause of AS. Instead, the condition appears to develop through a combination of inherited genetic factors and other influences that are not yet fully understood.

According to MedlinePlus Genetics, several genetic variations are associated with ankylosing spondylitis, including HLA-B27 and variations in genes such as ERAP1 and IL23R. Researchers are still studying how these genetic differences contribute to the condition.

Factors linked to a higher risk of AS

  • HLA-B27: This inherited genetic variant is one of the strongest known genetic risk factors for AS.
  • Family history: Having a close relative with AS can increase the likelihood of developing the condition.
  • Other genetic variations: Several genes involved in immune system function have been associated with AS.
  • Environmental influences: Factors outside a person's genes may contribute, but the specific triggers remain uncertain.
  • Age: Symptoms commonly begin in adolescence or early adulthood, although the condition may be recognized later.

AS is not caused by ordinary physical activity or poor posture. Although these factors may affect how back pain feels, they are not established causes of the underlying inflammatory disease.

How does HLA-B27 affect ankylosing spondylitis risk?

HLA-B27 stands for human leukocyte antigen B27. It is a normal variation of the HLA-B gene, which provides instructions for producing a protein involved in immune system function.

The immune system uses HLA proteins to help distinguish the body's own proteins from foreign substances. HLA-B27 is associated with a greater likelihood of certain inflammatory conditions, including ankylosing spondylitis.

Scientists do not yet fully understand why HLA-B27 increases AS risk. Researchers have proposed several possible explanations involving immune system activity, but no single mechanism has been confirmed as the complete explanation.

Does everyone with HLA-B27 develop AS?

No. Most people who carry HLA-B27 never develop ankylosing spondylitis.

The NHS reports that more than 8 in 10 people with AS carry the HLA-B27 variant. However, the variant also occurs in people who do not have the disease.

This distinction is important because HLA-B27 increases susceptibility rather than guaranteeing illness. A person can carry the variant throughout life without experiencing AS-related inflammation.

The opposite is also true: some people develop ankylosing spondylitis without having HLA-B27. Other genetic and non-genetic factors are thought to contribute.

Can ankylosing spondylitis run in families?

Ankylosing spondylitis can occur in multiple members of the same family. However, it does not follow a simple inheritance pattern in which inheriting one gene automatically causes the disease.

A parent who carries HLA-B27 has a chance of passing that genetic variant to a child. Yet inheriting the variant and developing AS are two different outcomes.

Even among children who inherit HLA-B27 from a parent with AS, most do not develop the condition.

Family history may therefore be useful during medical evaluation, particularly when someone has ongoing back pain with features suggesting inflammation. It does not establish whether a family member currently has AS or will develop it in the future.

What does an HLA-B27 blood test tell you?

An HLA-B27 test checks whether a person carries the genetic variant associated with an increased risk of ankylosing spondylitis. It is performed using a blood sample.

The test can provide supporting information during an evaluation for inflammatory back pain, but it cannot confirm or exclude AS on its own.

If your HLA-B27 result is positive

A positive result means the genetic variant is present. It does not mean that AS is present, that symptoms will develop, or that treatment is automatically needed.

A healthcare professional interprets the result alongside the person's symptoms, examination findings, family history, and other investigations.

If your HLA-B27 result is negative

A negative result means the variant was not detected. It does not completely rule out ankylosing spondylitis because some people with AS do not carry HLA-B27.

According to the NHS guidance on diagnosing ankylosing spondylitis, clinicians may use blood tests and imaging of the spine and pelvis when evaluating possible AS. Genetic testing contributes to the assessment but is not a definitive diagnostic test.

Why imaging and symptoms still matter

A rheumatologist, a doctor specializing in inflammatory joint and related conditions, may look for patterns that help distinguish inflammatory back pain from other causes.

Examples of symptoms that may occur with AS include:

  • Lower back or buttock pain that develops gradually.
  • Back stiffness after sleeping or prolonged inactivity.
  • Pain that improves with movement rather than rest.
  • Discomfort that interrupts sleep, especially during the night.
  • Fatigue or pain in other affected joints.

These symptoms can have several possible causes. Their timing, duration, and overall pattern help guide medical evaluation.

X-rays may reveal changes in the sacroiliac joints associated with AS. MRI can sometimes identify inflammation before structural changes become visible on X-rays.

Blood tests that measure inflammation may also be used, although normal inflammatory markers do not necessarily exclude the condition.

Which treatments are available for ankylosing spondylitis?

There is currently no cure for ankylosing spondylitis. However, treatment can reduce pain and stiffness, improve mobility, control inflammation, and help limit long-term complications.

Management usually involves a combination of physical activity, structured rehabilitation, and medication. The most appropriate approach depends on disease activity, affected joints, other medical conditions, and response to previous treatments.

1. Exercise and physical therapy

Exercise is a central part of AS management, even when medication is needed.

Regular movement helps maintain spinal flexibility, posture, muscle strength, and everyday function. A physical therapist can recommend activities based on a person's current mobility and symptoms.

Common approaches include:

  • Stretching: Helps maintain flexibility and reduce stiffness.
  • Posture exercises: Support upright positioning and spinal mobility.
  • Strengthening exercises: Help support the back and surrounding joints.
  • Walking or swimming: Provide opportunities for regular physical activity.
  • Water-based exercises: May make movement more comfortable for people who find land-based exercise difficult.

The best exercise plan is one that is suitable for the person's abilities and can be followed consistently. A physiotherapist or rheumatologist can help adjust activities when pain, stiffness, or mobility limitations change.

2. Nonsteroidal anti-inflammatory drugs (NSAIDs)

NSAIDs are commonly used as an initial medication treatment for pain and inflammation in AS.

Examples include naproxen and ibuprofen. These medicines can help relieve back pain and stiffness, making movement and daily activities easier.

NSAIDs are not suitable for everyone. Potential problems include stomach irritation, gastrointestinal bleeding, kidney complications, and cardiovascular risks in some patients.

A healthcare professional considers medical history, other medications, and individual risk factors when recommending an NSAID. Treatment is generally reviewed to find an effective dose while limiting unwanted effects.

3. Biologic medicines for ongoing inflammation

When AS remains active despite appropriate initial treatment, a rheumatologist may recommend a biologic medicine.

Biologics target specific parts of the immune system involved in inflammation. Two established groups used in AS are tumor necrosis factor (TNF) inhibitors and interleukin-17 (IL-17) inhibitors.

Examples of TNF inhibitors include adalimumab and etanercept. IL-17 inhibitors include secukinumab and ixekizumab.

The Mayo Clinic describes biologic therapies as treatment options for people whose symptoms are not adequately controlled with NSAIDs. These medicines target inflammatory pathways rather than simply relieving pain.

Biologic treatment requires medical supervision. Because these medicines affect immune system activity, clinicians assess infection risks and perform appropriate screening before treatment.

Response is monitored over time to determine whether the medicine is providing sufficient benefit.

4. JAK inhibitors

Janus kinase (JAK) inhibitors are another category of targeted medication that may be considered for certain people with active AS.

Unlike many biologics, which are administered by injection or infusion, JAK inhibitors are taken by mouth.

These medicines interfere with signaling pathways involved in inflammation. Their use requires careful assessment because they can carry important risks, including serious infections and other potentially significant adverse effects.

A rheumatologist considers individual risk factors, previous treatment response, and relevant prescribing guidance before recommending this option.

5. Other medicines and injections

Some people with AS experience inflammation in joints outside the spine, such as the knees or ankles.

In selected cases, a clinician may consider a conventional disease-modifying antirheumatic drug (DMARD), such as sulfasalazine, for inflammation in these peripheral joints.

Conventional DMARDs are generally not effective for treating inflammation limited to the spine.

Local corticosteroid injections may also be considered for particular inflamed joints. Long-term systemic corticosteroid treatment is not a routine approach to managing spinal inflammation in AS.

6. Surgery in selected cases

Most people with ankylosing spondylitis do not need surgery.

However, surgery may be considered when the disease causes major structural problems or substantial joint damage. Hip replacement, for example, may help restore movement and reduce pain when a hip joint is severely affected.

Corrective spinal surgery is uncommon and is generally reserved for carefully selected situations.

How do doctors choose the right AS treatment?

Treatment is not based on HLA-B27 status alone. Clinicians focus on the person's disease activity, symptoms, function, examination findings, and response to therapy.

For example, someone whose symptoms are adequately controlled with exercise and an NSAID may not need advanced medication. Another person with persistent inflammatory activity may benefit from targeted treatment.

The NHS treatment guidance describes an approach that combines exercise, physiotherapy, and medicines, with additional therapies considered when initial treatment does not provide sufficient relief.

Other conditions can also influence medication selection. A rheumatologist may consider associated inflammatory bowel disease, psoriasis, or eye inflammation when choosing among available treatments.

Regular follow-up helps assess whether treatment is controlling inflammation, preserving mobility, and supporting daily life. Medication may be adjusted when the benefits are inadequate or side effects become a concern.

Can lifestyle changes help manage ankylosing spondylitis?

Daily habits can support medical treatment, although they do not remove the underlying genetic risk or cure the disease.

Helpful measures include staying physically active, maintaining comfortable posture, following a balanced diet, and avoiding smoking.

People with prolonged stiffness may find that gentle movement throughout the day helps them remain comfortable. Alternating periods of activity with appropriate rest can also make daily tasks easier to manage.

There is no established special diet that cures AS. A nutritious eating pattern can support general health and help with weight management, but dietary changes should not replace prescribed treatment.

Smoking avoidance is particularly relevant because smoking is associated with worse outcomes in axial spondyloarthritis.

When should you see a rheumatologist?

Medical evaluation is appropriate when back pain or stiffness persists, becomes progressively more limiting, or repeatedly interferes with sleep and daily activities.

Symptoms that improve with movement but worsen after rest may prompt an assessment for inflammatory back pain, particularly when there is a family history of AS.

A person with an HLA-B27-positive result and no symptoms does not automatically need AS medication. However, the result may be useful to discuss with a healthcare professional if relevant symptoms arise.

Seek prompt medical assessment for a painful, red eye with sensitivity to light or blurred vision, as AS can be associated with eye inflammation called uveitis. Sudden severe back pain after an injury, particularly in someone with a stiff or fused spine, also warrants urgent evaluation.

What to remember about HLA-B27 and AS treatment

Ankylosing spondylitis is a complex inflammatory condition influenced by genetics and other factors that researchers are still investigating. HLA-B27 is an important risk marker, but it is not a stand-alone diagnostic test and does not determine the treatment a person needs.

Modern treatment offers several ways to manage AS. Exercise and physical therapy remain fundamental, while anti-inflammatory medicines and targeted therapies can help control symptoms and inflammation. Working with a rheumatologist allows treatment to be tailored to the person's clinical findings, health risks, and long-term goals.

Frequently Asked Questions

Answers to common questions about the HLA-B27 gene, ankylosing spondylitis risk, and available treatments.

Can you have HLA-B27 without having ankylosing spondylitis?

Yes. Many healthy people carry the HLA-B27 variant without developing ankylosing spondylitis. A positive blood test indicates an associated genetic risk, not a diagnosis. Healthcare professionals consider symptoms, examination findings, and other investigations when evaluating possible AS.

Can ankylosing spondylitis develop if HLA-B27 is negative?

Yes. Although HLA-B27 is found in many people with ankylosing spondylitis, some people with the condition test negative. Other genetic and environmental factors may contribute, so a negative result does not completely exclude AS.

Does HLA-B27 need to be treated?

No. HLA-B27 is an inherited genetic variant, not a disease that requires treatment. When someone has ankylosing spondylitis, treatment focuses on controlling inflammation, relieving symptoms, and maintaining mobility rather than changing the genetic variant.

What happens if NSAIDs do not control ankylosing spondylitis?

If symptoms and inflammatory disease activity remain inadequately controlled, a rheumatologist may consider additional medicines, including TNF inhibitors, IL-17 inhibitors, or certain JAK inhibitors. The choice depends on the person's medical history, associated conditions, treatment response, and potential risks.

Can ankylosing spondylitis be cured permanently?

There is currently no permanent cure for ankylosing spondylitis. However, treatment can significantly improve symptoms and function, and some people achieve sustained periods of low disease activity. Ongoing exercise, appropriate medication, and regular medical follow-up are important parts of long-term management.

Citations

  1. MedlinePlus Genetics – Ankylosing Spondylitis: Causes, Genetics, and Inheritance
  2. NHS – Ankylosing Spondylitis: Causes and HLA-B27
  3. NHS – Ankylosing Spondylitis: Diagnosis
  4. Mayo Clinic – Ankylosing Spondylitis: Diagnosis and Treatment
  5. NHS – Ankylosing Spondylitis: Treatment
Share this article