Many Hollywood stars credit fasting for their svelte physique, with new research now suggesting an intermittent eating plan could ward off infections.
Food poisoning puts many people off eating. It was unclear whether this was beneficial or detrimental when it came to clearing the responsible infection.
To learn more, scientists from the University of British Columbia, Canada, had a group of mice fast for 48 hours before and while being exposed to Salmonella bacteria via their mouths.
Fasting was found to "dramatically interrupt [the] infection" and prevent subsequent gastroenteritis, a common cause of vomiting and diarrhoea.
Read more: Fasting 'no magic bullet' for weight loss
While more research is required, restricting your calorie intake to set windows – like the popular 5:2 diet – may boost gut bacteria that prevent damaging bugs from invading the gastrointestinal tract.
"Most animals, including humans, lose their appetite when sick," the scientists wrote in the journal PLOS Pathogens.
This may seem counterintuitive, if you assume patients need nutritious food to boost their immune response.
Read more: Fasting lowers blood pressure in rats
"Whether this sickness behaviour has evolved as a protective mechanism is unclear", wrote the scientists.
With fasting becoming "popular in recent years", the team infected the mouths of mice that had either been fasting or eating as normal with the bacteria Salmonella enterica, a common cause of food poisoning.
"Notably, the fasted mice were protected from infection," wrote the scientists.
In contrast, the Salmonella "rapidly expanded in the intestines of [the] fed mice".
Read more: Malnutrition worsens coronavirus outcomes
"Moreover, Salmonella in the fasted mice did not cause any intestinal damage as the bacteria were unable to invade the intestinal wall," wrote the scientists.
When the fasted mice were re-fed for one day after their eating was restricted, there was a "dramatic increase" in Salmonella numbers and their invasion into the intestinal wall, but to a lesser extent than the rodents who had eaten as normal.
Watch: Fasting less effective than a calorie-controlled diet
The scientists also investigated the potential of fasting in a group of mice that "lacked a microbiome".
These animals "suffered less gastroenteritis" but still became unwell, highlighting how beneficial gut bacteria may provide "partial protection".
Overall, similar results also occurred with the food-poisoning bacteria Campylobacter jejuni, revealing the findings are not Salmonella specific.
"We therefore conclude fasting can protect hosts from intestinal bacterial infections, in part through the actions of the gut microbiome," wrote the scientists.
"When food is limited, the microbiome appears to sequester the nutrients that remain, preventing pathogens from acquiring the energy they need to infect the host.
"While more research is needed, fasting or otherwise adjusting food intake could be exploited therapeutically to modulate infectious diseases in the future."
Watch: How to safely handle raw chicken