Although some people do have a predisposition to be overweight or even obese, scientists at the Medical Research Council's Epidemiology Unit in Cambridge discovered that having an active lifestyle could go a long way to countering a person's genetic inheritance.
The researchers made their conclusions after analysing the genes of over 20,000 men and women aged 39 to 79, looking for 12 genetic markers known to increase body mass index (BMI) and the risk of obesity.
With this, they calculated a "genetic predisposition score" for each person.
They then asked them to fill out questionnaires about their physical activity levels at work and elsewhere.
They concluded: "The findings challenge the popular myth that obesity is unavoidable if it runs in the family and could guide future treatments to combat the obesity crisis."
Dr Ruth Loos from the MRC, who led the study, said: "Our research proves that even those who have the highest risk of obesity from their genes can improve their health by taking some form of daily physical activity."
She added: "People don’t have to run marathons to make a difference either - walking the dog or working in the garden all counts. It goes to show we’re not complete slaves to our genetic make-up and really can make a big difference to our future health by changing our behaviour.
"It goes to show we’re not complete slaves to our genetic make-up and really can make a big difference to our future health by changing our behaviour."
The research is published in the journal PLoS Medicine.