This article has been updated after incorrectly inserting facts about IBS - Irritable Bowel Syndrome.
Changing your diet can rapidly affect the kind of bacteria that lives in your gut - which may explain how eating meat affect inflammatory bowel disease (IBD).
Volunteers taking part in a US study were told to switch from their normal diet to one wholly based on either plant or animal foods.
After just five days on the new diet, the six male and four female participants were found to have radically different populations of intestinal bacteria.
The altered microbial activity mirrored the differences seen between plant-eating and carnivorous animals.
In volunteers given the animal-based diet, the "microbiome" of trillions of gut bugs was more geared towards breaking down protein.
Plant-eaters had bacteria more suited to synthesising amino acids, the building blocks of proteins, from plant sugars.
The animal-based diet had the biggest impact, the researchers found, significantly altering the abundance of 22 clusters of microbes.
It also led to higher numbers of bile-tolerant bugs, including one, Bilophila wadsworthia, known to be associated with inflammatory bowel disease (IBD).
The team led by Dr Peter Turnbaugh, from Harvard University, wrote in the journal Nature: "Increases in the abundance and activity of Bilophila wadsworthia on the animal-based diet support a link between dietary fat, bile acids, and the outgrowth of micro-organisms capable of triggering inflammatory bowel disease.
"In concert, these results demonstrate that the gut microbiome can rapidly respond to altered diet, potentially facilitating the diversity of human dietary lifestyles."
The plant-based diet used in the study consisted of grains, legumes, fruits and vegetables, while the animal-based diet was made up of meats, eggs and cheeses.
Each of the volunteers was aged between 21 and 33 and had a body mass index (BMI) ranging from 19 (slim) to 32 (obese).
"Some people can end up being hospitalised due to acute abdominal pain. Patients with diarrhoea symptoms are often house-bound for weeks on end, or only venture as far as the local shop for fear of having an accident. As a result, they may suffer depression due to isolation and because their quality of life has been so severely affected. IBS is also associated with numerous problematic extra-intestinal symptoms such as fibromyalgia, period problems, sexual dysfunction, etc."
The findings lend support to the theory that effects of diet on bacteria living in the gut contribute to IBS, an autoimmune disorder incorporating two conditions, ulcerative colitis and Crohn's disease.
Symptoms include stomach pains, recurring diarrhoea and weight loss.
Gut bacteria may have learned to adapt to changing diets long ago when all humans were hunter gatherers, the scientists said.
"Consumption of animal foods by our ancestors was probably volatile, depending on season and stochastic foraging success, with readily available plant foods offering fall-back sources of calories and nutrients," they wrote.
"Microbial communities that could quickly, and appropriately, shift their functional repertoire in response to diet change would have subsequently enhanced human dietary flexibility."