Long before the keto diet became trendy, it was used to treat seizures in people with epilepsy. But the exact reason why this very-low-carb diet helps with seizures has puzzled researchers for decades.

Now, a new study in mice suggests that gut bacteria may play an important role in the keto diet's anti-seizure effects.

The study found that, in mice, the keto diet alters gut bacteria and that, if the animal's gut bacteria are removed, the diet no longer protects against seizures.

What's more, when the researchers took specific gut bacteria that were found in higher levels in mice on the keto diet and then transplanted these bacteria into the guts of other mice, the new bacteria protected them from seizures, even without the keto diet. [5 Ways Gut Bacteria Affect Your Health]

"Findings from our study reveal that treating mice chronically with specific bacteria that were enriched by the ketogenic diet protected them from seizures," study senior author Elaine Hsiao, an assistant professor of integrative biology and physiology at the University of California, Los Angeles (UCLA), told Live Science. ("Keto diet" is short for "ketogenic diet.") However, Hsiao stressed that more studies are needed before researchers know if the findings also apply to people.

But future studies may look into whether microbe-based treatments, known colloquially as probiotics, could be effective for treating seizures in people, the researchers wrote in the May 24 issue of the journal Cell.

Keto diet for seizures

The ketogenic diet is a high-fat, low-carbohydrate diet that's recently become popular for weight loss. But the diet has been used to treat epilepsy since the 1920s, according to the Epilepsy Society, a charity in the United Kingdom. Although most people with epilepsy today control their seizures with anti-epileptic drugs, the diet is sometimes prescribed to children with epilepsy who have not responded to several medications.

While on the diet, the body is forced to use fats instead of carbohydrates (sugars) as its fuel source. When this happens, the body produces compounds called ketones, which cells can use for energy.

Researchers have come up with many theories for why the keto diet helps to reduce seizures, but the exact mechanism remains unclear.

In the new study, the researchers used a mouse model of epilepsy to investigate whether gut bacteria could play a role in the diet's anti-seizure effects.

They found that mice that were fed a keto diet had substantial changes in their gut bacteria after about four days and that the mice experienced fewer seizures compared with mice fed a non-keto diet.

When the researchers examined the effect of the diet on mice that didn't have any gut bacteria — either because the mice were raised in a sterile environment, or because they were treated with antibiotics — they found that the keto diet no longer protected against seizures. "This suggests that the gut microbiota [bacteria] is required for the diet to effectively reduce seizures," study lead author Christine Olson, a UCLA graduate student in Hsiao's laboratory, said in a statement.

The study also found that two types of bacteria, called Akkermansia muciniphila and Parabacteroides, were elevated by the diet. When these two types of bacteria were given in combination to mice that didn't have their own gut bacteria, the anti-seizure effect of the keto diet was restored. What's more, this combination of bacteria protected against seizures even if the mice were fed a nno-keto diet.

Interestingly, "if we gave either species [of bacteria] alone, the bacteria did not protect against seizures," Olson said. "This suggests that these different bacteria perform a unique function when they are together."

In addition, the study found that the bacteria that were elevated by the keto diet altered levels of biochemicals in the gut and in the blood in ways that affected neurotransmitters in the brain.

Dr. Luis Caicedo, a pediatric gastroenterologist and director of the Fecal Microbiota Transplant Program at Nicklaus Children's Hospital in Miami, who was not involved in the study, called the research "very exciting." It "opens the door for more investigations… and certainly gives you more data on why this ketogenic diet works so [well]" for epilepsy, Caicedo said.

Future research will first need to reproduce the results in more animal studies, Caicedo told Live Science. Then, for human studies, researchers can examine changes in the gut microbiota after people start the keto diet, and see if humans show similar changes in their gut bacteria, he said.

Hsiao has helped to launch a startup, called Bloom Science, that will examine the potential clinical applications of her laboratory's findings.

Original article on Live Science.