Both fasting and gut bacteria have been popular health topics as more research has uncovered the way they can positively affect our health. Your microbiome—another term for gut bacteria—is crucially linked with many health outcomes in the body. The trillions of bacteria, viruses, and fungi in our bodies are hard at work lowering our risk of heart disease and reducing cholesterol, and even affecting our mood and mental health.

Fasting, particularly intermittent fasting, has burst out on the scene as a great way to lose weight while also offering an array of other health benefits. Fasting has been found to improve insulin sensitivity, immune functioning, and even help you get clear skin and reduce acne by letting the body focus its energies on other efforts besides digestion for a while. But how does fasting affect that other important health factor, your gut bacteria?

Researchers asked the same question and found some interesting answers. If you were worried about how your forays into the world of intermittent fasting might influence your gut bacteria, worry no more. Fasting is beneficial to your microbiome in several ways. If you think about it, both fasting and your microbiome are closely connected by their roles in the digestive system. Fasting allows your body to put less energy into digestion, which results in a lower production of postprandial endotoxemia. This compound is linked to obesity and insulin resistance. When fasting lowers the amount of postprandial endotoxemia produced, this is also beneficial for your gut bacteria.

Another meaningful way that fasting can have a positive effect on your microbiome is how it’s able to change the contents of that microbiome. That’s right—fasting can completely change what and how much of what is in your microbiome. One study found that water-only fasting during 7 days brought about a major reduction in the gut bacteria known as fusobacterium, one of the unwanted bacteria in our microbiome as it’s linked to colorectal cancer. Fasting could lower the number of these bacteria in the microbiome, thus lowering the risk of colorectal cancer.

If you’re thinking of doing a fast for the health benefits, don’t worry about the effects it might have on your microbiome. Fasting has many excellent health outcomes, and the improvement of our gut bacteria is one such positive health outcome.