Foods like fruits, vegetables, coffee, tea, wine, yogurt and buttermilk can increase the diversity of bacteria in a person's intestines. And that diversity can help ward off illness, said Dr. Jingyuan Fu, senior author of one of the studies.
"It is believed that higher diversity and richness [in gut bacteria] is beneficial," explained Fu. She is an associate professor of genetics at the University of Groningen in the Netherlands.
In addition, medications can also play a part in the makeup of your gut bacteria. Antibiotics, the diabetes drug metformin and antacids can cut down on gut bacterial diversity, the researchers found. Smoking and heart attacks also can have a negative effect, the team said.
Each person's intestines contain trillions of microorganisms, which doctors refer to as the "gut microbiome," said Dr. David Johnson. He is chief of gastroenterology at Eastern Virginia Medical School in Norfolk, Va., and a past president of the American College of Gastroenterology.
The gut microbiome plays an essential but little-understood role in human health, said Johnson, who was not involved with the new studies.
"It's the largest immune system in the body," Johnson explained. "These bacteria have a very dramatic and prominent role in determining health and disease."
To study the effect of lifestyle on the gut microbiome, Fu and her colleagues collected stool samples from more than 1,100 people living in the northern Netherlands.
The samples were used to analyze the DNA of the bacteria and other organisms that live in the gut. In addition to stools, the study collected information on the participants' diets, medicine use and health.
In the second study, researchers with the Flemish Gut Flora Project performed a similar analysis on stool samples taken from 5,000 volunteers in Belgium.
Both studies concluded that diet has a profound effect on the diversity of gut bacteria, although, Fu said, the "underlying theories of these dietary factors remain largely unknown."
Johnson added that medicines can have the same effect, and antibiotics actually can kill off some important strains of gut bacteria. "One dose of an antibiotic may disrupt your gut bacteria for a year," he said.
Both sets of researchers emphasized that their studies only help explain a fraction of gut bacteria variation -- roughly 18 percent for the Netherlands study, and about 7 percent for the Flemish study.
However, the findings from the two groups overlapped about 80 percent of the time, indicating that they are on the right track, the researchers said.
The Belgian researchers estimated that over 40,000 human samples will be needed to capture a complete picture of gut bacteria diversity.
Johnson noted that other research has shown that poor sleep, obesity, diabetes and the use of artificial sweeteners also can interfere with gut bacteria.
"The general rule is a balanced diet with high fiber and low carbs tends to drive a better gut health overall," he said.
According to Fu, once researchers have a clearer understanding of the gut microbiome and its effects on health, doctors could be able to help prevent or heal illness by reading or influencing the bacteria within people's bodies.
"The personalized microbiome may assist in personalized nutrition, personalized medicine, disease risk stratification and treatment decision-making," she said.
Both studies were published in the April 29 issue of the journal Science.