Evidence Based This post has 90 references
4 /5

The HLA-B27 Variant, Genetic Test & Autoimmunity

Written by Aleksa Ristic, MS (Pharmacy) | Last updated:
Puya Yazdi
Medically reviewed by
Puya Yazdi, MD | Written by Aleksa Ristic, MS (Pharmacy) | Last updated:
The osteocalcin test can point to bone problems HLA-B27

The HLA-B27 gene variant has a strong connection with certain autoimmune disorders. Still, you can carry this variant and maintain flawless health. Read on to learn about HLA genes, the HLA-B27 variant, how it can be detected, and how it relates to autoimmunity. Finally, we share some tips to naturally balance the immune system and reduce inflammation.

We have a more personalized version of this blog post on SelfDecode; check it out here.

What is HLA-B27?

The HLA System

The human leukocyte antigen (HLA) system is a group of human genes encoding the major histocompatibility complex (MHC) proteins, or HLAs. This system has three groups or classes; HLA-B genes, along with HLA-A and HLA-C, belong to the class I [1].

HLAs are proteins or antigens on the surface of white blood cells. They help flag and remove external components that may cause infection. HLA-B antigens bring bacterial or viral proteins from the inside to the cell surface so T-lymphocytes can detect and kill the infected cell [2].

They also have anti-cancer effects and play a role in organ transplant rejection [3, 1].

HLA genes come in many different forms or variants, which enable the fine-tuning of your immune system. Their diversity can be a double-edged sword, however, as some types increase the risk of autoimmune disorders [4].

The HLA genes encode proteins (antigens) that bring external components to the surface of white blood cells, enabling your immune system to detect and destroy them.

HLA-B27 Antigen

The HLA-B27 antigen supports antiviral immune response by “flagging” peptides from viruses – such as influenza, HIV, and Epstein-Barr – and presenting them to T-killer cells [5].

The gene for HLA-B27 has over 100 variations. Despite the beneficial roles, HLA-B27 is strongly associated with a group of autoimmune joint disorders known as spondyloarthritis (SpA) [6, 7].

The most common variations associated with autoimmunity are [8]:

  • HLA-B*27:05 (Caucasians/whites)
  • HLA-B*27:04 (Chinese)
  • HLA-B*27:02 (Mediterranean)

On the other hand, HLA-B*27:06 seems to have a protective role [9].

HLA-B27 enables an antiviral immune response, but certain subtypes correlate with autoimmune disorders.


The prevalence of HLA-B27 varies from 50% in some Indian populations to almost zero in Australian Aborigines. About 6% of the US population carries this variant, which is more common among white people [10].

HLA-B27 and Autoimmune Diseases

It’s important to note that just because certain genotypes are associated with a disease, it doesn’t necessarily mean that everyone with that genotype will actually develop the disease! Many different factors, including other genetic and environmental factors, can influence the risk of autoimmune diseases.

Ankylosing Spondylitis (AS)

As mentioned, HLA-B27 strongly correlates with higher rates of certain autoimmune diseases, such as [11]:

  • Psoriasis
  • Ankylosing spondylitis (spine deformation)
  • IBD (inflammatory bowel disease), in combination with spondylitis
  • Reactive arthritis (Reiter’s syndrome) – inflammation of joints, urethra, and eyes

These conditions have a common name spondyloarthritis, the main one being ankylosing spondylitis (AS). In AS, inflammation gradually fuses spine vertebrae, causing back pain and limited movement. It usually affects young men [12, 13].

Doctors treat AS with drugs such as NSAIDs and TNF-inhibitors, but their effectiveness is limited. Besides HLA-B27, other genetic and environmental factors are involved [14, 15, 2].

HLA-B27 is associated with autoimmune disorders known as spondyloarthritis. The main one is ankylosing spondylitis, which causes spine inflammation and chronic back pain.

The Connection

The connection between HLA-B27 and ankylosing spondylitis (AS) is among the strongest in the HLA system: 90–95% of all AS patients have this variant. For other conditions, the prevalence ranges between 50-90% [2].

Does this mean almost everyone with HLA-B27 will get AS or another autoimmune disease? Not at all!

Approximately 1.3% of European HLA-B27 carriers have AS, though Caucasian (white) ethnicity and the presence of a family member with AS increase the chance 16-20 times [16, 17].

Over 50% of people with anterior uveitis (eye inflammation) have this variant, but only 1% of all HLA-B27 carriers develop uveitis [18].

In other words, HLA-B27 is involved in the above disorders, but many more factors contribute and decide which carriers will get them.

Between 50-95% of spondyloarthritis patients have the HLA-B27 variant, but only 1-2% of the carriers develop a disease; it depends on other environmental and genetic factors.


Despite the well-known connection, the role of HLA-B27 in autoimmunity is still not fully clear. According to the main theories, the error probably occurs in [19, 20, 21, 5]:

  1. The way it binds and presents peptides to T-killer cells: upon activation, T-killer cells can mistakenly flag all HLA-B27 fragments as foreign peptides and attack them
  2. The biochemical properties (structure) of HLA-B27 itself: it can misfold in such a way that causes intracellular inflammation and triggers an immune response

Whatever the root cause, inflammation is the chief mechanism behind these autoimmune disorders [22].

HLA-B27 Test

Who Should Test?

You may want to do an HLA-B27 test if you [23, 24]:

  • Have chronic pain, stiffness, and inflammation in your joints
  • Have painful eye inflammation (uveitis)
  • The above symptoms began in your early adulthood (the 20s or 30s)

Additionally, your doctor will order HLA tests if you’re undergoing organ or tissue transplantation [25].

Genetic Variants

The following genetic variants (SNPs) can help determine the chance you’re carrying HLA-B27 [26, 27, 15, 28, 29]:

  • rs4349859 ( “A” allele correlates with HLA-B27, “G” doesn’t)
  • rs13202464 (“G” allele correlates with HLA-B27, “A” doesn’t)
  • rs116488202 (“T” allele correlates with HLA-B27, “C” doesn’t)

Carrying two alleles of HLA-B27 (homozygosity) doesn’t correlate more strongly with autoimmune diseases, compared with one allele [16].

Please note: To confirm the presence of this variant and detect the exact subtype, you may want to do the HLA-B27 blood test.

Other tests

The following tests and lab markers can help detect inflammation and diagnose an autoimmune disease [30, 31, 32, 33]:

If you’ve started experiencing joint pain and stiffness in early adulthood, you may want to test for the HLA-B27 variant and check lab markers of autoimmunity and inflammation.

Other Factors

As mentioned, HLA-B27 is just a link in the chain of factors that can contribute to spondyloarthritis; scientists have discovered other genes and triggers.


Besides the major player, HLA-B27, other HLA variants may correlate with ankylosing spondylitis; these include HLA-B60 and HLA-DR1 [34, 35].

Variations in non-HLA genes associated with ankylosing spondylitis include [36, 37, 38, 39, 40]:

We have compiled a list of genetic traits associated with ankylosing spondylitis.

Microbiome and Infections

A solid body of evidence voices the role of the microbiome in spondyloarthritis [41, 42, 43].

Microbial infections can trigger autoimmune disorders by disturbing the gut probiotics, the guardians of your immunity. Reactive arthritis (previously known as Reiter’s syndrome) is associated with the following infections [44, 45, 46]:

  • Salmonella
  • Shigella
  • Yersinia
  • Chlamydia
  • Mycobacteria
  • Klebsiella

Klebsiella infection is a crucial trigger of autoimmune joint and gut disorders, especially in HLA-B27 carriers [47, 48].


Other factors that may contribute to autoimmune diseases include:

  • C-section delivery [49]
  • Antibiotics [50, 51]
  • Environmental toxins [52]
  • Sleep deprivation [53, 54]
  • Stress [55]
Besides HLA-B27, factors that contribute to autoimmunity include other genes, microbiome impairment, toxins, sleep deprivation, stress, and persistent infections.

Recommendations to Balance the Immune System

Please note: none of the approaches listed below are meant to prevent or treat an autoimmune disorder, and they must not be used in place of medical treatment. If you have a diagnosed condition, make sure to consult with your doctor to see if you could add these to your treatment protocol.


Given the role of the microbiome and bacterial infections in autoimmunity triggered by HLA-B27, make sure to boost your gut health by:

Klebsiella is one of the autoimmunity triggers, and it thrives on sugar and starch. To cut your risk of infection, reduce the intake of sweets and refined carbs [56, 57, 58].

Zinc and copper-rich foods such as organ meats, seafood, seeds, and cocoa will support your immune system, reduce inflammation, and improve gut health [59, 60, 61].

Intermittent or other types of fasting stimulate autophagy, which can help balance an overactive immune response [62, 63].

Cut back on sugar and starch; eat foods rich in probiotics, prebiotics, zinc, and copper; practice intermittent or other types of fasting.


To keep inflammation in check and balance the immune system, try to:


The following supplements may help by supporting your immune system and reducing inflammation:

Additional Resources

Food irritants can have an important role in inflammation and autoimmune disorders. The Lectin Avoidance Diet has a powerful program to help you detect and eliminate foods that are pro-inflammatory for you (hint: it’s not just about lectins).

About the Author

Aleksa Ristic

Aleksa Ristic

MS (Pharmacy)
Aleksa received his MS in Pharmacy from the University of Belgrade, his master thesis focusing on protein sources in plant-based diets.  
Aleksa is passionate about herbal pharmacy, nutrition, and functional medicine. He found a way to merge his two biggest passions—writing and health—and use them for noble purposes. His mission is to bridge the gap between science and everyday life, helping readers improve their health and feel better.


1 Star2 Stars3 Stars4 Stars5 Stars
(8 votes, average: 4.00 out of 5)

FDA Compliance

The information on this website has not been evaluated by the Food & Drug Administration or any other medical body. We do not aim to diagnose, treat, cure or prevent any illness or disease. Information is shared for educational purposes only. You must consult your doctor before acting on any content on this website, especially if you are pregnant, nursing, taking medication, or have a medical condition.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles View All