Let’s raise our glass to some good news! Drinking a beer with your dinner can boost your gut’s bacterial diversity and balance. And both these factors lead to intestinal wellbeing, as well as the body’s ability to fend off infections and diseases. In fact, the right balance of gut microbes can reduce the risk of obesity, diabetes, heart problems, cancer and even dementia.

Beer’s intestinal benefits come from polyphenols and other compounds that are found in its hops, barley and yeast, researchers from Nova University in Lisbon, Portugal, found. (If you’re not a beer fan, red wine also contains beneficial amounts of polyphenols.) What’s more, if you don’t enjoy drinking alcoholic beer, the same health benefits are also found in non-alcoholic beers.

Participants were recruited from the Lisbon metropolitan area through social media ads. To assess their suitability for physical examination and research, applicants were asked to visit NOVA Medical School to answer a brief questionnaire on their medical knowledge. All those with documented cardiovascular disease, diabetes or other relevant metabolic disorders, infectious diseases, antibiotic use in the previous four weeks or diarrhea in the last two weeks, and alcohol, drug or other substance abuse, were excluded from taking part in the study.

If you don’t enjoy drinking alcoholic beer, the same health benefits are also found in non-alcoholic beers.

Ultimately, the double-blind study was modest in size with only 19 healthy participants, and only men between the ages of 23 and 58 included. The volunteers were randomly divided into two groups who drank 11 fluid ounces of either alcoholic or non-alcoholic lager with dinner for 4 consecutive weeks. Researchers took blood and stool samples of the participants at the start, as well as at the conclusion, of the study.

Notable improvements in intestinal health were seen in the volunteers who drank both alcoholic and non-alcoholic beer. The reason? They had a more diverse microbiome, the mix of organisms that live in our digestive tract. “These results suggest the effects of beer on gut microbiota modulation are independent of alcohol and may be mediated by beer polyphenols,” the authors explained, in a statement.

More good news: The beer-drinking volunteers did not have a change in their Body Mass Index (BMI), nor was there any negative effect on their heart health during the testing period, according to their blood markers. And, the benefits were impressive. “Beer polyphenols might reach the gut where they can modulate bacterial growth. In addition, some beers may contain live fermentation microorganisms,” noted the lead author of the study, Ana Faria, a professor on the faculty of NOVA Medical School. Fermented foods such as kimchi, sauerkraut, tempeh and cultured yogurts have already been shown to be a boon to good intestinal health.

Substances such as polyphenols and yeast components may be removed during the production of beer, especially with the beer filtration process. Choosing beers with higher yeast and polyphenol content may have an even stronger effect on intestinal flora than the lager beers that were used in this study.

It’s summertime, so toast to our guts’ good bacterial balance with a glass of cold beer. Just keep in mind that moderation is key. Too much of a good thing can have negative health consequences. Enjoy in moderation and consider opting for a non-alcohol variety. Cheers!

The study can be found in Journal of Agricultural and Food Chemistry.