"Intermittent Fasting or 5:2 diet" affects the nervous system and increases people's vulnerability to infection, according to a University of Bath study.

The fasting diet has garnered popularity in recent times, thanks to celebrity and media endorsements, as a way of lowering blood pressure, extending lifespan, losing weight and protection against conditions like dementia.

Researchers said that the diet that requires people to reduce their food intake can decrease their ability to fight infection.

Nick Priest, Lecturer in Biology & Biochemistry, said that previous studies have highlighted the positive effects of diet restriction and anti-oxidants consumption, but they haven't focused on negative health effects in people associated with these anti-ageing treatments.

"We know that certain stresses such as starvation or exposure to pathogens can extend life and increase fertility, but we have found that ironically this has a trade-off in terms of immune function," Priest said in a statement.

For the study, researchers observed four stress and immunity genes associated with longevity in fruit flies. Here, they wanted to comprehend the link between life expectancy and the ability to fight infection

They found that exposure to a fungal pathogen significantly increased the lifespan of fruit flies by activating these stress and immunity genes. However, the flies developed a weak immune response and affected their ability to battle infection as time passed.

"Our findings are not all that surprising. We have known for decades that starved mice are more likely to succumb to serious infections. But, there has been a lot more interest in the short term benefits than potential long-term costs," Priest said.

Researchers said that the genes that were studied are also found in humans. Hence, the study is also applicable to humans as well.

The finding is published in the journal Evolution.