People who are likely to become obese could reduce the risk by 40% just by gardening or going for a walk every day, according to experts.
Certain people are genetically predisposed to becoming obese, although most cases are caused by unhealthy diets and sedentary lifestyles, but even genes could be defeated with regular exercise, challenging the idea that obesity that runs in families is impossible to avoid.
Scientists at the Medical Research Council (MRC) epidemiology unit in Cambridge studied more than 20,400 people aged between 39 and 79, and found the most active cut their chance of becoming obese by an average 40% compared to the least active.
To assess whether participants were predisposed to the condition, each subject gave a DNA sample, which was examined for one or more 121 genetic markers that increase weight.
A risk of obesity was calculated through individual genetic susceptibility scores, which showed the link between high body mass index (BMI) and score was significantly higher in people who exercised less often.
Authors of the study, published in the journal PLoS Medicine, said: "Our data show that increased physical activity levels are associated with lower BMI in the population overall, but that particular individuals who are genetically predisposed to obesity would benefit more from increased physical activity levels than individuals who are genetically protected."