Yo-yo dieting triggers a caveman response to famine that leads to inevitable weight gain, research suggests.
A survival mechanism hard-wired by evolution causes the brain to interpret repeated diets as periods of food scarcity.
Between diets, its sends out signals telling the body to store more fat in case of future shortages.
The study, published in the journal Evolution, Medicine and Public Health, is based on observations of nature.
Garden birds, such as robins, follow the same weight-gaining strategy in times of plenty. That is why they appear plumper in winter, when seeds and insects are harder to find.
The scientists constructed a mathematical model to investigate the phenomenon in a simulated animal that does not know when to expect its next meal.
It showed that during times of scarcity, an animal that grabs the opportunity to put on weight has the best chance of passing on its genes.
Lead researcher Dr Andrew Higginson, from the University of Exeter, said: "Surprisingly, our model predicts that the average weight gain for dieters will actually be greater than those who never diet.
"This happens because non-dieters learn that the food supply is reliable so there is less need for the insurance of fat stores."
Humans evolved in a harsh environment where food supplies could be abundant one moment and gone the next.
In that situation, individuals with the ability to store more fat would have a survival advantage.
The "feast and famine" world is mirrored today when people resort to yo-yo diets, resulting in a vicious circle of weight gain and severe calorie cutting, said the scientists.
"The best thing for weight loss is to take it steady," said Dr Higginson. "Our work suggests that eating only slightly less than you should, all the time, and doing physical exercise is much more likely to help you reach a healthy weight than going on low-calorie diets."