When Cynthia Bulik started studying eating disorders back in the early 1980s, what she read in the scientific literature clashed with what she saw in the clinic. At the time, theories about the causes of these conditions were focused primarily on explanations based on family dynamics and sociocultural factors.

These descriptions could not explain how, despite dangerously low body weights, patients with eating disorders were often “hyperactive and said they felt well, and only started feeling poorly when we nourished them,” says Bulik, who is currently a professor at both the University of North Carolina and the Karolinska Institute in Sweden. “I became convinced that there had to be something biological going on.”

Since then, a growing body of research has confirmed Bulik’s observations. Cases of individuals developing rapid alterations in eating behaviors after various infections—the first of which emerged nearly a century ago—have built up over decades. For example, symptoms of eating disorders often occur in pediatric acute-onset neuropsychiatric syndrome (PANS), a condition in which children experience sudden behavioral changes, typically after a streptococcal infection. In addition, over the last few years, several large-scale epidemiological investigations based on data from population registers in Scandinavia—compiled by Bulik and others—have linked eating disorders and autoimmune diseases, including Crohn’s, celiac and type 1 diabetes.

Now, Bulik and her colleagues have tied exposure to infections during childhood to an increased risk of developing eating disorders in a large, population-based examination. In their study, which was published in April in JAMA Psychiatry, the researchers examined a cohort of 525,643 adolescent girls born in Denmark between 1989 and 2006, among whom 4,240 were diagnosed with an eating disorder. (Boys were excluded from the study because too few males received an eating disorder diagnosis to conduct a meaningful analysis.)

The team’s investigation, which included data up until the end of 2012, revealed that girls who were hospitalized for a severe infection had a 22 percent increased risk for anorexia, a 35 percent higher risk for bulimia, and a 39 percent increased risk for other nonspecified eating disorders, compared to those who did not receive a diagnosis. Treatment with anti-infective agents, such as antibiotics or antivirals, also appeared to have an effect: individuals who had received three or more prescriptions for those drugs had a higher risk of developing an eating disorder than those with fewer prescriptions. The risk was greatest within the first three months after a hospital admission or a redeemed prescription.

“[This is] an interesting study that adds to the existing body of literature demonstrating the importance of biological factors in the etiology of eating disorders,” says Neville Golden, a professor of pediatrics at Stanford University who was not involved in this work. Although these findings can only establish a correlation between infections and eating disorders without proving a causal link, the authors contend that their results support the hypothesis that the immune system might be a culprit. The idea also receives support from other observations, such as the previously established connections between these conditions and autoimmune disorders and reports of elevated levels of cytokines, molecules involved in inflammation, in patients with anorexia.

Another potential explanation for the latest findings, according to study co-author Lauren Breithaupt, a clinical and research fellow at Harvard Medical School, is that perturbations in the gut microbiome may be responsible for the observed changes in behavior. “We know that both contracting an infection and taking an anti-infective agent alters the stability of microbes in our gut,” Breithaupt explains. “And the connection between the gut and the brain, the gut-brain axis, is really strong—so the changes that occur could affect behaviors via this communication line.”

Bulik and her colleagues have identified evidence that eating disorders can alter the gut microbiome. In a 2015 study, they reported that people with anorexia nervosa had a significantly less varied population of intestinal microbes than healthy individuals, and a normal level of diversity was only partially restored after treatment. One ongoing hypothesis, according to Bulik, is that the bacteria that survive in anorexia nervosa are the ones that thrive in a nutrient- and energy-poor environment.

If this were indeed the case, one fascinating possibility would be that the presence of those microbes could lead to a self-sustaining problem—since those newly dominant bugs might be at risk when patients return to a healthy diet. “We know that after you renourish someone with anorexia nervosa in the hospital, a very common thing that happens is we send them back home and they lose weight again,” Bulik says. “There has always been a psychological explanation for that… but what if that somehow is the survival of the bacterial fittest?”

This is one of several theories about how the microbiome might contribute to eating disorders. There are also ideas about how microbes might influence inflammation, according to Beate Herpertz-Dahlmann, a child and adolescent psychiatrist at the RWTH University Clinics in Germany who is currently involved in projects that are investigating this link in several European countries.

Bacteria, for instance, may develop antibodies against molecules that influence appetite. Another possibility is that a deeply altered microbiome could lead to a so-called “leaky gut,” in which pathological material seeps through the intestines into the blood vessels, evoking an immune response elsewhere in the body, in areas such as the brain.

“[Eating disorders] were first described in the 1600s, and it’s amazing how little we know about how to manage and treat them,” Golden says. “A better understanding of how these diseases develop will advance us in our treatments.”