Join Here   |   Log In

HLA-B27: Genetic Risk, Ankylosing Spondylitis, and Autoimmune Diseases

Key Takeaways:

  • The HLA-B27 serotype is an inherited immune system marker that is linked to an increased relative risk of several autoimmune and autoinflammatory diseases, including ankylosing spondylitis, psoriatic arthritis, and IBD.
  • Not everyone with HLA-B27 develops disease; environmental and other genetic factors also play a role.
  • You can check your 23andMe or AncestryDNA raw data for SNPs that tag the HLA-B27 genotype with 98% specificity in certain ancestry groups. Clinical testing may be needed for medical diagnoses.
  • A positive HLA-B27 result is not a diagnosis, and a negative result does not rule out spondyloarthritis. Symptoms, family history, examination, and imaging help determine what the result means.
Members will see their genotype report below and the solutions in the Lifehacks section. Consider joining today. 

What is HLA-B27 and why is it important?

HLA-B27 is a genetic marker that greatly increases the risk for ankylosing spondylitis and other autoimmune diseases. It is part of the immune system’s way of identifying which proteins are your own cells vs. foreign invaders. Carrying a certain HLA-B27 type increases your risk for certain autoimmune diseases, especially ankylosing spondylitis. About 6-9% of people carry it, but being HLA-B27 positive is just a risk factor – it doesn’t cause an autoimmune disease by itself.

What is the HLA system?

Human leukocyte antigens (HLA) belong to the part of our immune system known as the major histocompatibility complex (MHC). The HLA genes code for the proteins that help our body determine the difference between a foreign invader that needs to be attacked and what is ‘self’.

People can have many different HLA serotypes, giving us all slightly different strengths and weaknesses against microbial diseases.

But along with attacking foreign invaders, a handful of HLA types also increase susceptibility to autoimmune diseases, where the body attacks its own cells.

HLA-B27: Why test for it?

Many people first hear about HLA-B27 from their doctor requesting a test for it. The test is a quick blood test to see whether you carry the HLA-B27 serotype, and this is the most accurate way to know if you have it. Usually, the doctor is looking to add strength to a probable diagnosis for certain autoimmune diseases based on symptoms in the patient.

How common is HLA-B27 positive?

While the frequency of the HLA-B27 serotypes can vary a bit by ancestry, in general, about 6-9% of the population carries the HLA-B27 allele.[ref] Positive HLA-B27 is not a diagnosis by itself. It increases susceptibility, which combines with other factors.

You can be HLA-B27 positive with no symptoms, and most people with this HLA type never develop ankylosing spondylitis or other autoimmune diseases.

HLA-B27 and autoimmune diseases:

People who carry the HLA-B27 serotype are at an increased risk for inflammatory-related autoimmune diseases.

Autoimmune diseases associated with being HLA-B27 positive include:

  • ankylosing spondylitis[ref]
  • reactive arthritis
  • psoriatic arthritis
  • juvenile idiopathic arthritis – spondyloarthritis-related subgroup [ref]
  • inflammatory bowel disease[ref]
  • acute anterior uveitis (inflammation of the eye)[ref][ref]

Post-infectious syndrome for shigellosis, salmonella, and chlamydia is also more common in people who are HLA-B27 positive. This is also known as reactive arthritis.[ref]

Autoimmune Diseases Associated with HLA-B27
Condition Relative Risk if HLA-B27+ % of Patients HLA-B27+ Key Symptoms
Ankylosing spondylitis 20-fold increase >95% Back pain, spinal stiffness
Reactive arthritis Increased >80% Joint pain post-infection
Psoriatic arthritis Increased Variable Skin and joint symptoms
IBD (Crohn’s, UC) Increased Variable GI symptoms, joint pain
Uveitis Increased Variable Eye inflammation

Let’s dive into these in more detail.

What is ankylosing spondylitis (AS)?

Ankylosing spondylitis is a chronic inflammatory disease that mainly affects the spine. It causes back pain and spinal stiffness, and the vertebrae can eventually fuse together. This often occurs in younger adults, usually before age 45. You can find more information on the Spondylitis Association of America site.

Key symptoms of ankylosing spondylitis include:[ref][ref]

  • Inflammatory lower back pain and stiffness that is usually worse overnight and in the morning.
  • The lower back and buttock pain improves with movement, rather than rest.
  • Progressive stiffness in the spine that makes twisting and bending more difficult.
  • Inflammation can also affect other large joints such as the hips, shoulders, knees, or ankles – or the eyes.
  • Fatigue, loss of appetite, abdominal pain, and depression are also possible.

Carriers of HLA-B27 are at a 20-fold increased relative risk for ankylosing spondylitis.

Keep in mind that this is a relative risk, not absolute risk. Ankylosing spondylitis is an uncommon condition. For example, if the risk of ankylosing spondylitis is normally 1 in 200 (0.5%), carrying the HLA-B27 variant increases your risk to 20 in 200 (10%). These are just example numbers… talk with your doctor or a rheumatologist about other risk factors and whether this could apply to you.

In addition, a negative HLA-B27 result does not completely rule out axial spondyloarthritis according to some diagnostic guidelines.[ref]

Why is HLA-B27 linked to autoimmune diseases?

There are multiple subtypes of HLA-B27, and the specific types associated with ankylosing spondylitis include HLA-B*2701, HLA-B*2702, HLA-B*2704, HLA-B*2705, and HLA-B*2707.

First, it’s important to understand that not everyone who carries the HLA-B27 serotype will have ankylosing spondylitis. However, over 95% of people with ankylosing spondylitis are HLA-B27 positive. This makes it an important marker to check for someone who already has symptoms of ankylosing spondylitis.

Similarly, one study stated that 80% of people with reactive arthritis are HLA-B27 positive, but again, not everyone with HLA-B27 will have reactive arthritis.[ref] Other studies show that 80% of patients with spondyloarthritis, which includes ankylosing spondylitis, psoriatic arthritis, reactive arthritis, and enteropathic arthritis, are HLA-B27 positive.[ref]

Therefore, the HLA-B27 serotype is a major risk factor for these autoimmune diseases, but it doesn’t cause the autoimmune disease by itself. It can also be helpful to your doctor in determining which medications may be more likely to work for you if you have an autoimmune condition.[ref]

Additional factors are involved

Instead, other factors must be involved in triggering the disease. Researchers think that the following factors may play a role:[ref]

  • toxicant exposure
  • persistent pathogens
  • gut microbiome changes
  • diet or lifestyle factors

Proteins in the body, including the HLA proteins, are made up of amino acids that join and then fold up in a particular way. Researchers have found that HLA-B27 tends to misfold.

The specific subtypes of HLA-B27 associated with autoimmune diseases are likely to be misfolded or unfolded, causing problems when formed in the endoplasmic reticulum (ER). The misfolded or unfolded proteins in the endoplasmic reticulum cause stress in that organelle. Researchers theorize that the body’s unfolded protein response mechanism causes inflammation.[ref]

Other genetic variants may also play a role in susceptibility. For example, MEFV mutations, which can cause an autoinflammatory condition called familial Mediterranean fever, are found at a higher rate in people with ankylosing spondylitis.[ref]

Related article: Familial Mediterranean fever and MEFV mutations

HLA-B27 and the immune system: Why autoimmune disease?

Why is HLA-B27 linked to an increased risk of autoimmune diseases?

Misfolded proteins:
Researchers theorize that the HLA-B27 protein often misfolds, which triggers the cells to initiate what is called the unfolded protein response. Essentially, this is the process by which proteins that aren’t formed correctly are broken down, and the amino acids are recycled. When this unfolded protein response is activated too often, such as with HLA-B27, it triggers the inflammatory response with the IL-23/IL-17 pathway.[ref]

Inflammatory Pathways (IL23/IL17/TNF)
Recent research shows that the IL-23/IL-17 inflammatory pathway is likely involved in many spondyloarthritis-associated autoimmune diseases for which HLA-B27 increases the risk. TNF-alpha, another inflammatory cytokine, may also increase the risk of these spondyloarthritis-associated autoimmune diseases.[ref]

Related article: Genetic variants that increase TNF-alpha 
IL-17 and Autoimmune diseases

Gut microbiome changes:
Recent research shows that HLA-B27 positivity, especially in people with ankylosing spondylitis, is associated with significant changes to the composition of the gut microbiome. These changes shifted the way that the gut microbiome interacts with tryptophan metabolism, cysteine metabolism, and branched-chain amino acids. The researchers looked at whether these changes were likely playing a causal role in ankylosing spondylitis by doing fecal microbiome transplants from people with AS to germ-free mice. The mice then developed key features of AS — including a shift toward proinflammatory M1 macrophages.

In addition, the researchers identified a tryptophan metabolite, cinnabarinic acid, as the missing microbial-derived metabolite that normally suppresses M1 macrophages from the pro-inflammatory shift. The study concludes: “Together, these findings support a model in which HLA-B27–associated gut dysbiosis and metabolic reprogramming promote AS pathogenesis through macrophage-mediated inflammation and osteocatabolic signaling, highlighting microbial–metabolic pathways as potential therapeutic targets.”[ref]

Molecular mimicry?
At one point, researchers advanced a theory that HLA-B27 seemed similar to an infecting bacterial pathogen and thus caused autoimmune diseases. The idea is called ‘molecular mimicry,’ and the reason the immune system attacks ‘self’ is that it thinks it is a bacterium. The problem is that newer research shows that you can create ankylosing spondylitis in an animal model without the T-cells needed to attack a pathogen. Thus, researchers are now uncertain whether molecular mimicry is the cause of ankylosing spondylitis or a bystander.[ref][ref][ref]

Positive side: HLA-B27 and protection from viral infections

Many mutations that persist in the human genome also create a benefit for survival. For example, a mutation that helps someone survive a pathogenic cholera outbreak means the person carrying the mutation lives to pass it on to their kids. Much of our genome is sculpted by surviving against bacterial or viral pathogens; if our ancestors hadn’t survived, we wouldn’t be here today.

Hepatitis C  and HIV protection:
Interestingly, carriers of the HLA-B27 have a survival advantage and are likely to live longer with hepatitis C infections and with HIV.[ref][ref]

EBV protection:
Additionally, people with the HLA-B27 serotype may mount a better response against the Epstein-Barr virus.[ref]

Related article: Epstein-Barr Virus, Genetics and Reactivation


HLA-B27 Genotype Report

Genetic variants included in 23andMe and AncestryDNA data coding for HLA-B27 are listed below. These variants show if you are likely to carry an HLA-B27 type. A clinical test may still be needed to be 100% certain that you carry the exact HLA-B27 type associated with autoimmune diseases.

The prevalence of the HLA-B27 serotype varies by population group. For example, HLA-B27 is found in 10-16% of Norwegians, Swedes, and Icelanders, and at even higher levels in Inuit. In the Mediterranean regions, it is less common and found in 2-6% of the population.[ref]

Access this content:

An active subscription is required to access this content.

Log in below or Join as a member.



Lifehacks: Probiotics and Perspective

What can you do with this information: Keeping it in perspective

Don’t freak out if you are a carrier of HLA-B27. Instead, use this information as a heads-up not to ignore health issues such as back pain.

Blood tests to confirm:
If you want to get the blood test for HLA-B27 and can’t get it through your doctor, you can order it on your own in the US. UltaLab Tests is one place that I use. There are other websites as well, so shop around for the best price.

Understanding the risk:
Although HLA-B27 increases the relative risk of ankylosing spondylitis by 20-fold, it is still a rare disease, with about 1 in 2000 people having it.[ref] If you have the HLA-B27 serotype, the lifetime absolute risk is about 6-10%.[ref]

There are other genetic variants thought to be involved in susceptibility to ankylosing spondylitis, as well as environmental factors that increase the risk.[ref]

Gut microbiome connection to HLA-B27

Access this content:

An active subscription is required to access this content.

Log in below or Join as a member.



Related Articles and Topics:

CTLA4 Gene: Autoimmune Risk Factor

Back Pain: Genetics, Root Causes, and Solutions

 

Psoriasis Genes: How Genetics Point to Individualized Solutions

Rheumatoid Arthritis: Genetics, Root Causes, and Treatment Research


References:

“Ankylosing Spondylitis (Spondyloarthritis; Ankylosis) |myVMC.” HealthEngine Blog, 17 Sept. 2004, https://healthinfo.healthengine.com.au/ankylosing-spondylitis.

Buxton, Jane A., et al. “Genetic Determinants of Cocaine-Associated Agranulocytosis.” BMC Research Notes, vol. 8, June 2015, p. 240. PubMed Central, https://doi.org/10.1186/s13104-015-1219-4.

Branch, NIAMS Science Communications and Outreach. “Ankylosing Spondylitis.” National Institute of Arthritis and Musculoskeletal and Skin Diseases, NIAMS, 5 Apr. 2017, https://www.niams.nih.gov/health-topics/ankylosing-spondylitis.

Chen, Bin, et al. “Role of HLA-B27 in the Pathogenesis of Ankylosing Spondylitis.” Molecular Medicine Reports, vol. 15, no. 4, Apr. 2017, pp. 1943–51. PubMed Central, https://doi.org/10.3892/mmr.2017.6248.

Colmegna, Inés, et al. “HLA-B27-Associated Reactive Arthritis: Pathogenetic and Clinical Considerations.” Clinical Microbiology Reviews, vol. 17, no. 2, Apr. 2004, pp. 348–69. PubMed Central, https://doi.org/10.1128/CMR.17.2.348-369.2004.

Dieleman, L. A., et al. “Lactobacillus GG Prevents Recurrence of Colitis in HLA-B27 Transgenic Rats after Antibiotic Treatment.” Gut, vol. 52, no. 3, Mar. 2003, pp. 370–76.
Evans, David M., et al. “Interaction between ERAP1 and HLA-B27 in Ankylosing Spondylitis Implicates Peptide Handling in the Mechanism for HLA-B27 in Disease Susceptibility.” Nature Genetics, vol. 43, no. 8, July 2011, pp. 761–67. PubMed Central, https://doi.org/10.1038/ng.873.

Fröhlich, Fabienne, et al. “HLA-B27 as a Predictor of Effectiveness of Treatment with TNF Inhibitors in Axial Spondyloarthritis: Data from the Swiss Clinical Quality Management Registry.” Clinical Rheumatology, vol. 42, no. 5, May 2023, pp. 1267–74. DOI.org (Crossref), https://doi.org/10.1007/s10067-022-06490-8.

Ge, Shichao, et al. “HLA-B27 Modulates Intracellular Growth of Salmonella Pathogenicity Island 2 Mutants and Production of Cytokines in Infected Monocytic U937 Cells.” PLoS ONE, vol. 7, no. 3, Mar. 2012, p. e34093. PubMed Central, https://doi.org/10.1371/journal.pone.0034093.

Haroon, Nigil. “Does a Positive HLA-B27 Test Increase Your Risk of Mortality?” The Journal of Rheumatology, vol. 42, no. 4, Apr. 2015, pp. 559–60. www.jrheum.org, https://doi.org/10.3899/jrheum.150017.

Huang, Tianwen, et al. “HLA-B27-Associated Gut Microbiota and Amino Acid Perturbations Promote Ankylosing Spondylitis through M1 Macrophage Activation.” Gut Microbes, vol. 18, no. 1, Dec. 2026, p. 2630561. DOI.org (Crossref), https://doi.org/10.1080/19490976.2026.2630561.

Joshi, Reeti, et al. “Is There a Higher Genetic Load of Susceptibility Loci in Familial Ankylosing Spondylitis?” Arthritis Care & Research, vol. 64, no. 5, May 2012, pp. 780–84. PubMed Central, https://doi.org/10.1002/acr.21601.

Kuthe, Shilpa S., et al. “Clinical, Functional, and Radiological Profile of Patients With Spondyloarthritis: A Cross-Sectional Study From a Tertiary Care Center in Central India.” Cureus, Sept. 2026. DOI.org (Crossref), https://doi.org/10.7759/cureus.116195.

Larson, Theresa, et al. “Emerging Drugs for Uveitis.” Expert Opinion on Emerging Drugs, vol. 16, no. 2, June 2011, pp. 309–22. PubMed Central, https://doi.org/10.1517/14728214.2011.537824.

Lin, Phoebe, et al. “HLA-B27 and Human Β2-Microglobulin Affect the Gut Microbiota of Transgenic Rats.” PLoS ONE, vol. 9, no. 8, Aug. 2014, p. e105684. PubMed Central, https://doi.org/10.1371/journal.pone.0105684.

Lin, Zhiming, et al. “A Genome-Wide Association Study in Han Chinese Identifies New Susceptibility Loci for Ankylosing Spondylitis.” Nature Genetics, vol. 44, no. 1, Dec. 2011, pp. 73–77. PubMed, https://doi.org/10.1038/ng.1005.

Macfarlane, Tatiana V., et al. “Relationship between Diet and Ankylosing Spondylitis: A Systematic Review.” European Journal of Rheumatology, vol. 5, no. 1, Mar. 2018, pp. 45–52. PubMed Central, https://doi.org/10.5152/eurjrheum.2017.16103.

Mandour, Mohamed, et al. “The Role of the IL-23/IL-17 Axis in Disease Initiation in Spondyloarthritis: Lessons Learned From Animal Models.” Frontiers in Immunology, vol. 12, June 2021, p. 618581. PubMed Central, https://doi.org/10.3389/fimmu.2021.618581.

Roberts, Rebecca L., et al. “Prevalence of HLA-B27 in the New Zealand Population: Effect of Age and Ethnicity.” Arthritis Research & Therapy, vol. 15, no. 5, 2013, p. R158. PubMed Central, https://doi.org/10.1186/ar4341.

Sheehan, Nicholas J. “The Ramifications of HLA-B27.” Journal of the Royal Society of Medicine, vol. 97, no. 1, Jan. 2004, pp. 10–14.

Singh, Animesh, and Sarah Karrar. “The Role of Intracellular Organisms in the Pathogenesis of Inflammatory Arthritis.” International Journal of Inflammation, vol. 2014, 2014, p. 158793. PubMed Central, https://doi.org/10.1155/2014/158793.

Sorrentino, Rosa, et al. “HLA-B27 and Antigen Presentation: At the Crossroads between Immune Defense and Autoimmunity.” Molecular Immunology, vol. 57, no. 1, Jan. 2014, pp. 22–27. PubMed, https://doi.org/10.1016/j.molimm.2013.06.017.

Stoll, Matthew L., et al. “Age and Fecal Microbial Strain-Specific Differences in Patients with Spondyloarthritis.” Arthritis Research & Therapy, vol. 20, 2018, p. 14. PubMed Central, https://doi.org/10.1186/s13075-018-1510-6.

Vitulano, C., et al. “The Interplay between HLA‐B27 and ERAP1/ERAP2 Aminopeptidases: From Anti‐viral Protection to Spondyloarthritis.” Clinical and Experimental Immunology, vol. 190, no. 3, Dec. 2017, pp. 281–90. PubMed Central, https://doi.org/10.1111/cei.13020.

Zhu, Wei, et al. “Ankylosing Spondylitis: Etiology, Pathogenesis, and Treatments.” Bone Research, vol. 7, Aug. 2019, p. 22. PubMed Central, https://doi.org/10.1038/s41413-019-0057-8.
—. “Ankylosing Spondylitis: Etiology, Pathogenesis, and Treatments.” Bone Research, vol. 7, Aug. 2019, p. 22. PubMed Central, https://doi.org/10.1038/s41413-019-0057-8.


About the Author:

Debbie Moon is a biologist, engineer, author, and the founder of Genetic Lifehacks where she has helped thousands of members understand how to apply genetics to their diet, lifestyle, and health decisions. With more than 11 years of experience translating complex genetic research into practical health strategies, Debbie holds a BS in engineering from Colorado School of Mines and an MSc in biological sciences from Clemson University. She combines an engineering mindset with a biological systems approach to explain how genetic differences impact your optimal health.

Research profiles: ORCID · Google Scholar · Editorial policy More about Debbie Moon