A 2-week-old baby is placed in a machine to have his body mass index measured at the Children's Hospital in Aurora, Colo., during a 2010 research study on obesity in infants. (Rick Wilking/Reuters)

How can skinny people still exist? If we live in an environment that promotes obesity — filled with fast food, sugary drinks, TVs and cars — why isn’t everyone obese? And if our genes cause us to be fat, why has the search for “obesity genes” failed?

For me, the quest to answer these questions began when I was a student working in labs with genetically identical mice eating identical food. Surprisingly, the mice differed greatly in size. What caused the differences if it wasn’t their diets or DNA?

As I moved between labs, I noticed that pregnant mice without access to exercise wheels produced offspring that would themselves have larger, fatter offspring. While the first and second generations weren’t much larger, subsequent generations certainly were. To me, this was an amazing observation: The activity levels of grandmothers and mothers during pregnancy determined the fatness of future generations. But was my observation correct? And if so, what were the mechanisms?

I wasn’t the first to observe this trend. Half a century earlier, the geneticist D.S. Falconer had found that by breeding only the largest offspring of genetically identical mice eating identical diets, it was possible to produce progressively larger and fatter offspring over several generations.

This finding supported my intuition that genes and food aren’t sufficient explanations of obesity. Despite the recent fanfare over the identification of a suite of genes associated with obesity, they explain less than 2 percent of the variation in obesity between individuals. This leaves the other 98 percent — known as the missing heritability — still to be discovered.

When I began my own experiments, I found further evidence that calorie intake doesn’t explain obesity: Active mothers and their leaner offspring ate more food and calories than the fatter, inactive mice. Once again, I wasn’t the first to discover this. In the 1950s, nutrition scientist Jean Mayer demonstrated that active animals, whether mice, rats or humans, ate more food and stayed leaner and healthier than sedentary ones.

By 2014, I had conducted an extensive literature review that turned my intuition into a theory that revealed the missing heritability and a new way of understanding why so many children today are obese. The answer was a combination of a mother’s body composition and physical activity during pregnancy.

When pregnant women are physically active, the increased energy demands redirect nutrients to her muscles and away from her fetus. This competition between the mother’s muscles and the developing fetus’s fat cells produces leaner, healthier babies. Their genes and food intake are irrelevant to the process.

This competition doesn’t happen in inactive mothers. Without having to struggle for energy and nutrients, the fat cells in the fetus increase in both size and number, increasing the birth weight of the infant — a factor strongly related to adult obesity and Type 2 diabetes. This is passed on down the line, with future generations becoming fatter and increasingly inactive and unhealthy.

This is an example of non-genetic evolution, where traits are transmitted to offspring with no underlying change in their genome. This process helps to explain my and Falconer’s observations in mice, while demonstrating the power of the uterine environment to permanently shape the metabolic processes that predispose some fetuses to obesity and metabolic disease.

As it turned out, the idea that the uterine environment affects the fetus is commonplace in evolutionary biology and has been observed across many species. Known as “accumulative maternal effects,” it describes how a mother’s age, size, fat stores and behavior, including physical activity, affect not only her health and metabolism but also that of future generations.

Humans are no exception. For instance, a 1995 study of babies born through egg donation found that the only discernible factor influencing their birth weight was the surrogate mother’s body mass. The egg donor’s body mass, her own birth weight and the birth weight of her other children bore no relationship to the birth weight of the infant produced from the donated egg.

The genes from the egg donor’s biological mother played no detectable role in the birth weight of the infant. This helps to explain why, despite many billions of research dollars, the search for the “genes that make us fat” will continue to disappoint.

The idea that the nine months we spend in the womb affects our health has been around for centuries; in fact, it was discussed by the ancient Greek physician Hippocrates. More recently, the “thrifty phenotype” hypothesis developed in the 1990s argued that an impoverished uterine environment can program a fetus’s metabolism, predisposing it to obesity and diabetes. However, this doesn’t explain why childhood and adult obesity exploded during the late 1970s, when food was abundant.

This is where my theory transforms our understanding of childhood obesity.

For most of human history, survival required huge amounts of physical exertion. Hunting, gathering, chopping wood and carrying water provided a dose of physical activity that made deliberate exercise unnecessary. Yet over the past century, socio-environmental changes slowly eliminated physical labor. At first, technological advances coupled with a more healthful food supply led to the birth of children that were the fittest in human history. But by the middle of the 20th century, the advent of labor-saving devices, the rising popularity of the car and passive, sedentary entertainment led to people becoming fatter and more inactive.

From 1965 to 2010, the amount of energy expended in the home by women in the United States decreased by almost 2,000 calories per week. At the same time, the amount of time they spent watching TV and using computers doubled. My research has found that obese U.S. women get less than one hour of vigorous physical activity per year. Not surprisingly, just as non-exercising mice produce grandchildren that are bigger and fatter, so do U.S. women.

By the late 1970s, a tipping point was reached in which mothers were so inactive that the evolution of human energy metabolism was markedly altered. As a result, fetuses grew so large that the need for Caesarean sections rose significantly. The increased use of surgical interventions during pregnancy allowed both the larger babies and the mothers who produced them to survive and reproduce. Thus, natural selection was rendered artificial selection, and the number of metabolically compromised children and adults increased in the global population.

Non-genetic evolution is the primary determinant of obesity — not gluttony, fast food or genes. The best solution to the obesity epidemic is to encourage would-be mothers to increase their levels of physical activity so that they can prepare their metabolism for pregnancy and have leaner, healthier children.

Archer is a physiologist and obesity theorist at the Nutrition and Obesity Research Center, University of Alabama at Birmingham. This article was produced by New Scientist.