What Causes the Immune System to Attack Itself?

The immune system attacks the body’s own tissues when it loses the ability to distinguish between foreign invaders and healthy cells. This process, called autoimmunity, affects roughly 8% to 10% of the global population and involves a combination of genetic vulnerability, environmental triggers, and breakdowns in the internal checkpoints that normally keep immune responses in check.

There is no single cause. Autoimmunity develops when several factors converge: the right (or wrong) genetic makeup, an environmental event that flips the switch, and a failure of the cells specifically designed to prevent friendly fire. Understanding each layer helps explain why some people develop autoimmune conditions and others don’t.

Molecular Mimicry: When Infections Confuse the Immune System

One of the most well-understood triggers is a case of mistaken identity called molecular mimicry. Some bacteria and viruses carry proteins that closely resemble proteins found in your own tissues. When the immune system builds weapons to fight the infection, those weapons can also lock onto the look-alike proteins in healthy organs, joints, or nerves.

This isn’t theoretical. Strep throat, caused by the bacterium Streptococcus pyogenes, produces proteins that resemble a heart muscle protein called myosin. In some people, the antibodies made to fight strep cross-react with heart tissue, causing rheumatic heart disease. A gut infection with Campylobacter jejuni, one of the most common causes of food poisoning, produces antibodies that can attack nerve cell coatings called gangliosides, leading to the paralysis seen in Guillain-Barré syndrome. The infection clears, but the immune assault on the body’s own tissue continues.

The Epstein-Barr Virus Connection

Epstein-Barr virus (EBV), the virus behind mononucleosis, infects roughly 95% of adults worldwide. Most people recover without lasting effects, but EBV has an unusually strong link to autoimmune disease. Research from the NIH found that a viral protein called EBNA2 binds to nearly half of the genetic regions associated with lupus risk. That same protein also binds to regions tied to multiple sclerosis, rheumatoid arthritis, inflammatory bowel disease, type 1 diabetes, and celiac disease.

EBNA2 doesn’t directly cause these diseases. Instead, it works through human transcription factors, molecules that switch genes on and off. By activating genes in autoimmune-risk regions, the virus can push a genetically susceptible person’s immune system toward attacking itself. This helps explain why EBV infection appears to be a near-universal prerequisite for multiple sclerosis: the virus creates the conditions for the immune system to go wrong, but only in people whose genetics make them vulnerable.

Genetics Load the Gun

Autoimmune diseases run in families, and a major reason involves a group of genes called HLA genes. These genes code for proteins on the surface of your cells that act like ID badges, helping the immune system recognize what belongs in the body and what doesn’t. Variations in these genes can cause the immune system to misread those badges.

The specifics matter. People who carry two copies of the HLA-DR4 gene variant have the highest genetic risk for rheumatoid arthritis. The critical detail comes down to a single amino acid: variants with a positively charged amino acid at one specific position in the protein are associated with RA, while a variant with a negatively charged amino acid at the same spot is not. For type 1 diabetes, children who inherit one copy of HLA-DR3 and one copy of HLA-DR4 develop diabetes-related autoantibodies at significantly higher rates than those with two copies of either one alone.

These genetic patterns vary by population. The HLA variants most strongly linked to type 1 diabetes in people of European descent are different from those in Japanese or Taiwanese populations. This is one reason autoimmune disease rates and types differ across ethnic groups. But genes alone are rarely enough. Most people with high-risk HLA variants never develop autoimmune disease, which is why environmental triggers matter so much.

Regulatory T Cells: The Failed Safety Net

Your immune system has a built-in safety mechanism: a specialized population of cells called regulatory T cells (Tregs) whose entire job is to suppress immune attacks against your own tissues. When this safety net fails, autoimmunity follows. People born with mutations in the gene that controls Treg function, called Foxp3, develop severe autoimmune disease affecting multiple organs, often fatally.

But Treg failure doesn’t require a dramatic genetic mutation. Under inflammatory conditions, Tregs can lose their identity entirely. Research has shown that Tregs can stop producing the Foxp3 protein that defines their function and transform into the very type of aggressive immune cell they were supposed to restrain, one that produces inflammatory signals like IL-17. In rheumatoid arthritis, an inflammatory molecule called TNF-alpha activates an enzyme in the inflamed joint lining that chemically disables the Foxp3 protein inside Tregs, essentially stripping them of their peacekeeping role at the exact site where restraint is needed most.

The balance between Tregs and inflammatory immune cells appears to be a critical tipping point. When Tregs are outnumbered or disabled, the immune system loses its brakes.

Gut Bacteria and Leaky Gut

The trillions of bacteria living in your intestines play a surprisingly large role in training and regulating the immune system. When the composition of gut bacteria shifts out of balance, a state called dysbiosis, it can set off a chain of events that erodes immune tolerance.

Healthy gut bacteria produce short-chain fatty acids, especially butyrate, that promote the development of regulatory T cells. When beneficial bacteria that produce butyrate decline, Treg numbers drop and inflammatory immune cells gain the upper hand. At the same time, dysbiosis damages the intestinal lining. The mucus layer thins, the tight junctions between gut cells loosen, and bacterial fragments leak into the bloodstream, a process often called “leaky gut.” These bacterial fragments trigger widespread inflammation.

Specific bacterial shifts have been linked to specific diseases. An overgrowth of Prevotella copri has been found in the guts of people with early rheumatoid arthritis, and this bacterium promotes the inflammatory immune responses that drive joint damage. Children at genetic risk for type 1 diabetes who go on to develop the disease tend to have lower microbial diversity and fewer butyrate-producing bacteria before autoimmunity appears. In multiple sclerosis, an imbalance in the ratio of inflammatory to regulatory immune cells has been linked to disease severity, and gut bacteria composition appears to influence that ratio.

Why Women Are Hit Harder

Women develop autoimmune diseases at roughly two to three times the rate men do, depending on the condition. For lupus, the ratio is closer to nine to one. Several biological factors explain this disparity.

Sex hormones play a direct role. Estrogen increases antibody production by immune cells and boosts the activity of certain immune pathways, while testosterone tends to dampen antibody levels. This gives women a stronger immune response to infections but also a greater likelihood of that response turning inward. Sex hormones also influence the thymus, the organ where immune cells are trained to distinguish self from non-self, providing a direct mechanism for the difference in autoimmune susceptibility.

Beyond hormones, the X chromosome itself may contribute. Women carry two X chromosomes, and one is normally silenced in each cell. When that silencing process is imperfect, genes on the “extra” X chromosome that influence immune function may be expressed at higher levels than intended. Microchimerism, the presence of fetal cells that persist in a mother’s body after pregnancy, has also been proposed as a contributing factor in some women.

Smoking and Chemical Triggers

Cigarette smoke is one of the strongest environmental risk factors for rheumatoid arthritis, and the mechanism is well understood. Smoking triggers a chemical modification in lung tissue that converts the amino acid arginine into citrulline, a molecule the body doesn’t normally produce in large quantities. The immune system can recognize these citrullinated proteins as foreign and produce antibodies against them, called anti-CCP antibodies. In people who carry the HLA-DRB1 gene variants associated with RA, smoking dramatically increases the risk of developing these antibodies and, with them, the disease.

This is a clear example of how genes and environment interact. The HLA gene creates a lock, and smoking provides the key. Without the genetic susceptibility, smoking still isn’t good for you, but it’s less likely to trigger RA specifically. With it, smoking becomes one of the most modifiable risk factors for the disease.

The Hygiene Hypothesis

Autoimmune diseases are far more common in industrialized nations than in developing countries, and they’ve been rising steadily for decades. One explanation is that modern hygiene, while protecting against deadly infections, deprives the developing immune system of the microbial exposure it needs to properly calibrate itself.

The mechanism centers on regulatory T cells again. Exposure to certain bacteria, parasites, and other microbes during early life appears to stimulate the development of Tregs through a process called bystander suppression, where the immune tolerance generated in response to one organism spills over to protect the body’s own tissues. Children born to mothers exposed to farming environments, with their greater microbial diversity, show higher levels of regulatory T cells in their cord blood at birth. Without that early microbial education, the immune system may develop with weaker internal restraints, making autoimmune overreaction more likely later in life.

How These Factors Work Together

Autoimmune disease almost never has a single cause. A more realistic picture looks like this: a person inherits HLA gene variants that make their immune system prone to misidentifying certain tissues. A viral infection like EBV activates genes in autoimmune-risk regions. Gut dysbiosis weakens regulatory T cell populations. An environmental exposure like smoking creates modified proteins that the immune system targets. Each factor alone might not be enough, but together they push the immune system past a threshold it can’t come back from.

This layered model also explains why autoimmune diseases are so unpredictable. Two siblings can share the same genetic risk, but only one gets sick, because the environmental triggers, infections, and gut bacteria shifts that complete the picture are different for each person. It also explains why autoimmune conditions tend to cluster: once the immune system’s tolerance mechanisms break down, the same person often develops more than one autoimmune disease over time.