Genes are largely to blame for bulging waistlines, a study has found.
While diet plays a key role in obesity, some people are programmed to get fat easily, research from the US suggests.
Although the work focused on mice, it is believed to be just as relevant to humans.
Lead scientist Dr Brian Parks, from the University of California at Los Angeles (UCLA), said: "Our research demonstrates that body-fat responses to high-fat, high-sugar diets have a very strong genetic component, and we have identified several genetic factors potentially regulating these responses.
"We found that obesity has similar genetic signatures in mice and humans, indicating the mice are a highly relevant model system to study obesity. Overall, our work has broad implications concerning the genetic nature of obesity and weight gain."
Dramatic increases in obesity over the past few decades have been linked to high-calorie sugar and fat-rich diets as well as sedentary "couch potato" lifestyles.
But the new research indicates that body-fat responses to food are to a large extent hard-wired in to our DNA.
Over the course of the two-year study, the UCLA team looked at the effect of high-calorie diets on more than 100 strains of laboratory mice.
The scientists located 11 regions of the genetic code associated with obesity and fat gain due to diet. Several of these overlapped with genes identified in human studies.
"We measured the change in fat dynamically at five different points following a high-fat, high-sugar feeding, providing strong evidence for a genetically controlled body-fat set-point," said Dr Parks.
"Our use of inbred mice strains also enabled detailed analysis of the relationship between obesity traits, gene expression, intestinal flora and diet."
Dietary responses varied greatly across strains, according to the findings reported in the online edition of the journal Cell Metabolism.
Increases in body fat as a proportion of weight ranged from zero to 600%.
Most mice strains responded during the first four weeks of a high-calorie diet and did not accumulate more fat during the remainder of the study. This suggests they reached a natural upper threshold limit after which continued fat gain was resisted by genetic mechanisms.
"We observed high heritability of about 80% for body-fat percentage across the study timeline," said co-author Professor Jake Lusis, also from UCLA.
"Changes in body-fat percentage after high-fat, high-sugar feeding were also highly heritable, suggesting that dietary responses are strongly controlled by genetics."
The findings are consistent with generational patterns of body mass index and obesity seen in humans, said the researchers.
"Our results emphasise the importance of gene-by-environment interactions, with important implications for an understanding of the overall genetic architecture of obesity," said Prof Lusis said.
"In particular, it will be of interest to examine behavioural and neurological differences among the strains as they relate to obesity traits."