Every week, it seems, we learn about another way that the gut microbiome—the trillions of bacteria living inside our gastrointestinal tracts—influence our health. That ecosystem in your gut plays a role in digestion, of course, but also strongly influences your weight, your blood sugar, your immune system and mood, among many other processes. Mostly, we’re told to eat a fiber-rich diet, full of “prebiotics” that beneficial bacteria love, and perhaps to take a probiotic supplement.

But there is one surprising factor that may be just as important as any of these, if not more so—your fitness level.

Animal studies had suggested this connection, but to find out if it applies to people, too, scientists in the department of kinesiology at San Francisco State University recruited 37 healthy young men and women. The participants underwent a treadmill test with gradual increases in the incline at the SF State Health Equity Research Lab. By measuring how much oxygen they consumed while exercising, the researchers could gauge their aerobic capacity—how aerobically fit they were. The participants also kept food logs for seven days and, at the end of the week, turned in stool samples for DNA analysis to determine the characteristics of each person’s gut bacteria.

Results: Aerobic fitness made all the difference. Those who were most fit had more gut bacteria that produced metabolic by-products including butyrate that have powerful anti-inflammatory properties. These metabolic by-products protect the lining of the intestines, preventing bacteria from leaking into the body—a condition known as leaky gut syndrome that can contribute to a host of other maladies (as can inflammation).

It’s early days in this kind of research, to be sure. Most of these young men and women were lean, for example, so it’s not known how well fitness levels affect the gut biome in people who are overweight or obese. And it’s no excuse to slack off on a healthy diet with gut-friendly foods including fiber-rich fruits, vegetables, yogurt and other fermented foods such as sauerkraut and pickles—and even dark chocolate.

But if you’re looking for a little extra motivation, or a lot of extra motivation considering the benefits of a healthy gut, it’s nice to know that staying—or getting—in good physical shape may be one of the best ways to keep your gut healthy. And since the gut biome is so powerful, you might be keeping yourself healthier in many other ways, too.

Related Articles