Skip navigation

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

URL of this page:

HLA-B gene

major histocompatibility complex, class I, B

Normal Function

The HLA-B gene provides instructions for making a protein that plays a critical role in the immune system. HLA-B is part of a family of genes called the human leukocyte antigen (HLA) complex. The HLA complex helps the immune system distinguish the body's own proteins from proteins made by foreign invaders such as viruses and bacteria.

HLA is the human version of the major histocompatibility complex (MHC), a gene family that occurs in many species. Genes in this complex are categorized into three basic groups:  class I, class II, and class III. In humans, the HLA-B gene and two related genes, HLA-A and HLA-C, are the main genes in MHC class I.

MHC class I genes provide instructions for making proteins that are present on the surface of almost all cells. On the cell surface, these proteins are bound to protein fragments (peptides) that have been exported from within the cell.  MHC class I proteins display these peptides to the immune system. If the immune system recognizes the peptides as foreign (such as viral or bacterial peptides), it responds by triggering the infected cell to self-destruct.

The HLA-B gene has many possible variations, that result in the production of proteins that differ by changes in at least one protein building block (amino acid). This variety allows each person's immune system to react to a wide range of foreign invaders. Most HLA-B gene alleles are rare, while others do not affect protein function or change the structure of the protein. Hundreds of versions (alleles) of the HLA-B gene are known, each of which is given a particular number (such as HLA-B27). Closely related alleles are categorized together; for example, more than 60 very similar alleles are subtypes of HLA-B27. These subtypes are designated as HLA-B*2701 to HLA-B*2763

Health Conditions Related to Genetic Changes

Ankylosing spondylitis

Variants in the HLA-B gene, particularly a version called HLA-B27, significantly increase the risk of developing ankylosing spondylitis. This condition is a form of painful, ongoing joint inflammation (chronic inflammatory arthritis) that primarily affects the spine. It is uncertain how the HLA-B27 gene variant causes the increased risk. Researchers speculate that HLA-B27 may abnormally display peptides that trigger an immune reaction, resulting in the inflammatory process that causes arthritis.  Other research suggests that the joint inflammation characteristic of this disorder may result from improper folding of the HLA-B27 protein or the presence of abnormal forms of the protein on the cell surface. It is possible that HLA-B27 may increase the risk of ankylosing spondylitis through more than one mechanism, or by different mechanisms in different individuals based on their genetic and environmental background.

Although many people with ankylosing spondylitis have the HLA-B27 variation, most people with this version of the HLA-B gene never develop the disorder. It is estimated that among those with the HLA-B27 allele, only one to five percent develop ankylosing spondylitis. Additional HLA-B alleles play a smaller role in disease risk: the HLA-B47 and HLA-B51 alleles can contribute to increased risk, whereas the HLA-B7 and HLA-B57 alleles might provide some small amount of protection against developing the condition. Other genetic and environmental factors, many of which are unknown, affect the chances of developing ankylosing spondylitis and influence its progression.

More About This Health Condition

Behçet disease

Several versions of the HLA-B gene, particularly HLA-B51, are associated with an increased risk of developing Behçet disease, a chronic inflammatory condition that affects many parts of the body. This association is strongest in people from Japan, the Middle East, and other parts of Asia. Researchers do not know how HLA-B51 increases the risk of this disorder. Although many people with Behçet disease have the HLA-B51 variation, most people with this version of the HLA-B gene never develop the condition. It appears likely that other factors, such as viral or bacterial infections and changes in other genes, also influence the development of this complex disorder.

More About This Health Condition

Juvenile idiopathic arthritis

MedlinePlus Genetics provides information about Juvenile idiopathic arthritis

More About This Health Condition

Psoriatic arthritis

MedlinePlus Genetics provides information about Psoriatic arthritis

More About This Health Condition

Rheumatoid arthritis

MedlinePlus Genetics provides information about Rheumatoid arthritis

More About This Health Condition


MedlinePlus Genetics provides information about Shingles

More About This Health Condition

Stevens-Johnson syndrome/toxic epidermal necrolysis

Several variations of the HLA-B gene have been studied as risk factors for Stevens-Johnson syndrome/toxic epidermal necrolysis (SJS/TEN), a potentially life-threatening skin reaction most often triggered by medications. For example, the variation HLA-B*1502 increases the risk of SJS/TEN in people taking certain medications used to treat seizures, particularly a drug called carbamazepine. This version of the gene is most common among people of Han Chinese or southeast Asian descent. Another version of the gene, HLA-B*5801, increases the risk of SJS/TEN in people treated with allopurinol (a drug used to treat kidney stones and gout, which is a form of arthritis caused by a buildup of uric acid in the joints). This association has been confirmed in southeast Asians and in people of non-Asian ancestry, although HLA-B*5801 occurs less frequently in non-Asian populations.

Studies suggest that the HLA-B gene variations associated with SJS/TEN cause the immune system to react abnormally to some medications. In a process that is not well understood, the triggering drug causes immune cells called cytotoxic T cells and natural killer (NK) cells to release a substance called granulysin. This substance destroys cells in the skin and mucous membranes, including the lining of the mouth and the airways. The death of these cells causes severe blistering and peeling that can have life-threatening effects.

Most people who have variations in the HLA-B gene that are associated with an increased risk of SJS/TEN never develop the condition, even if they are exposed to drugs that can trigger it. Researchers believe that additional genetic and nongenetic factors, many of which are unknown, likely play a role in whether a particular individual develops SJS/TEN.

More About This Health Condition

Other disorders

The HLA-B27 variant is associated with a group of inflammatory joint diseases related to ankylosing spondylitis. These conditions are known as spondyloarthropathies. Some of these disorders are associated with a common skin condition called psoriasis or with chronic disorders that cause inflammation of the intestinal walls (inflammatory bowel disease). One of the spondyloarthropathies, reactive arthritis, is typically triggered by bacterial infections of the gastrointestinal or genital tract. Following an infection, affected individuals may develop arthritis, back pain, and eye inflammation. Like ankylosing spondylitis, many factors probably contribute to the development of reactive arthritis and other spondyloarthropathies.

Among people with human immunodeficiency virus (HIV) infection, a version of the HLA-B gene designated HLA-B*5701 increases the risk of an adverse reaction (hypersensitivity) to the drug abacavir. This medication slows the spread of the HIV-1 virus in the body. People with abacavir hypersensitivity often develop a fever, chills, rash, upset stomach, and other symptoms when treated with this drug.

Several variations of the HLA-B gene appear to play a role in the progression of HIV infection to acquired immunodeficiency syndrome (AIDS). AIDS is a disease that damages the immune system, preventing it from effectively defending the body against infections. The signs and symptoms of AIDS may not appear until 10 or more years after infection with HIV. Studies suggest that people with HIV infection who have HLA-B27 or HLA-B57 tend to progress more slowly than usual to AIDS. On the other hand, researchers believe that HIV-positive individuals who have HLA-B35 tend to develop the signs and symptoms of AIDS more quickly than usual. Other factors also influence the progression of HIV infection to AIDS.

Another version of the HLA-B gene, HLA-B53, has been shown to help protect against severe malaria, a disease caused by a parasite that is carried by mosquitoes. HLA-B53 is most common in West African populations, where malaria is a frequent cause of death in children. Studies suggest that this version of the HLA-B gene may help the immune system respond more effectively to the parasite that causes malaria.

Other Names for This Gene

  • 1B07_HUMAN
  • HLA class I histocompatibility antigen, B alpha chain
  • leukocyte antigen B
  • MHC class I HLA-B heavy chain

Additional Information & Resources

Tests Listed in the Genetic Testing Registry

Scientific Articles on PubMed

Gene and Variant Databases


  • Brown MA, Xu H, Li Z. Genetics and the axial spondyloarthritis spectrum. Rheumatology (Oxford). 2020 Oct 1;59(Suppl4):iv58-iv66. doi: 10.1093/rheumatology/keaa464. Citation on PubMed
  • Chung WH, Hung SI. Recent advances in the genetics and immunology of Stevens-Johnson syndrome and toxic epidermal necrosis. J Dermatol Sci. 2012 Jun;66(3):190-6. doi: 10.1016/j.jdermsci.2012.04.002. Epub 2012 Apr 11. Citation on PubMed
  • Colbert RA, Tran TM, Layh-Schmitt G. HLA-B27 misfolding and ankylosing spondylitis. Mol Immunol. 2014 Jan;57(1):44-51. doi: 10.1016/j.molimm.2013.07.013. Epub 2013 Aug 30. Citation on PubMed or Free article on PubMed Central
  • de Menthon M, Lavalley MP, Maldini C, Guillevin L, Mahr A. HLA-B51/B5 and the risk of Behcet's disease: a systematic review and meta-analysis of case-control genetic association studies. Arthritis Rheum. 2009 Oct 15;61(10):1287-96. doi: 10.1002/art.24642. Citation on PubMed or Free article on PubMed Central
  • Giza M, Koftori D, Chen L, Bowness P. Is Behcet's disease a 'class 1-opathy'? The role of HLA-B*51 in the pathogenesis of Behcet's disease. Clin Exp Immunol. 2018 Jan;191(1):11-18. doi: 10.1111/cei.13049. Epub 2017 Oct 6. Erratum In: Clin Exp Immunol. 2018 Mar;191(3):373. Citation on PubMed
  • Gul A. Pathogenesis of Behcet's disease: autoinflammatory features and beyond. Semin Immunopathol. 2015 Jul;37(4):413-8. doi: 10.1007/s00281-015-0502-8. Epub 2015 Jun 12. Citation on PubMed
  • Kaur G, Mehra N. Genetic determinants of HIV-1 infection and progression to AIDS: immune response genes. Tissue Antigens. 2009 Nov;74(5):373-85. doi: 10.1111/j.1399-0039.2009.01337.x. Epub 2009 Sep 18. Citation on PubMed
  • Khan MA, Mathieu A, Sorrentino R, Akkoc N. The pathogenetic role of HLA-B27 and its subtypes. Autoimmun Rev. 2007 Jan;6(3):183-9. doi: 10.1016/j.autrev.2006.11.003. Epub 2006 Dec 8. Citation on PubMed
  • Khan MA. An Update on the Genetic Polymorphism of HLA-B*27 With 213 Alleles Encompassing 160 Subtypes (and Still Counting). Curr Rheumatol Rep. 2017 Feb;19(2):9. doi: 10.1007/s11926-017-0640-1. Citation on PubMed
  • Li Z, Brown MA. Progress of genome-wide association studies of ankylosing spondylitis. Clin Transl Immunology. 2017 Dec 1;6(12):e163. doi: 10.1038/cti.2017.49. eCollection 2017 Dec. Citation on PubMed
  • Lopez C, Saravia C, Gomez A, Hoebeke J, Patarroyo MA. Mechanisms of genetically-based resistance to malaria. Gene. 2010 Nov 1;467(1-2):1-12. doi: 10.1016/j.gene.2010.07.008. Epub 2010 Jul 22. Citation on PubMed
  • Meguro A, Inoko H, Ota M, Katsuyama Y, Oka A, Okada E, Yamakawa R, Yuasa T, Fujioka T, Ohno S, Bahram S, Mizuki N. Genetics of Behcet disease inside and outside the MHC. Ann Rheum Dis. 2010 Apr;69(4):747-54. doi: 10.1136/ard.2009.108571. Epub 2009 Aug 13. Citation on PubMed
  • Navid F, Layh-Schmitt G, Sikora KA, Cougnoux A, Colbert RA. The Role of Autophagy in the Degradation of Misfolded HLA-B27 Heavy Chains. Arthritis Rheumatol. 2018 May;70(5):746-755. doi: 10.1002/art.40414. Epub 2018 Mar 25. Citation on PubMed
  • Robinson J, Halliwell JA, Hayhurst JD, Flicek P, Parham P, Marsh SG. The IPD and IMGT/HLA database: allele variant databases. Nucleic Acids Res. 2015 Jan;43(Database issue):D423-31. doi: 10.1093/nar/gku1161. Epub 2014 Nov 20. Citation on PubMed
  • So J, Tam LS. Gut Microbiome and Its Interaction with Immune System in Spondyloarthritis. Microorganisms. 2020 Nov 4;8(11):1727. doi: 10.3390/microorganisms8111727. Citation on PubMed
  • Sousa-Pinto B, Pinto-Ramos J, Correia C, Goncalves-Costa G, Gomes L, Gil-Mata S, Araujo L, Delgado L. Pharmacogenetics of abacavir hypersensitivity: A systematic review and meta-analysis of the association with HLA-B*57:01. J Allergy Clin Immunol. 2015 Oct;136(4):1092-4.e3. doi: 10.1016/j.jaci.2015.03.019. Epub 2015 Apr 29. No abstract available. Citation on PubMed
  • Voruganti A, Bowness P. New developments in our understanding of ankylosing spondylitis pathogenesis. Immunology. 2020 Oct;161(2):94-102. doi: 10.1111/imm.13242. Epub 2020 Aug 17. Citation on PubMed
  • Wallace GR. HLA-B*51 the primary risk in Behcet disease. Proc Natl Acad Sci U S A. 2014 Jun 17;111(24):8706-7. doi: 10.1073/pnas.1407307111. Epub 2014 May 29. No abstract available. Citation on PubMed or Free article on PubMed Central
  • Young K, Frodsham A, Doumbo OK, Gupta S, Dolo A, Hu JT, Robson KJ, Crisanti A, Hill AV, Gilbert SC. Inverse associations of human leukocyte antigen and malaria parasite types in two West African populations. Infect Immun. 2005 Feb;73(2):953-5. doi: 10.1128/IAI.73.2.953-955.2005. Citation on PubMed or Free article on PubMed Central

The information on this site should not be used as a substitute for professional medical care or advice. Contact a health care provider if you have questions about your health.