Like the fabled Goldilocks, a woman’s weight gain during pregnancy may be a matter of striking a middling balance. New research from Kaiser Permanente shows that women who gain too much or too little weight during pregnancy may predispose their children for the future development of obesity.

Published Sunday in the American Journal of Obstetrics and Gynecology, the study is one of the largest to examine the effects of neonatal weight on childhood obesity. Researchers reviewed the electronic health records of more than 4,100 obstetrical patients from diverse racial backgrounds in Northern California.

After reviewing the records of children born to these women by ages 2 and 5, they found a much higher incidence of obesity among children born to mothers who’d gained more than the recommended weight during pregnancy, at 20.4 percent compared to a “normal” rate of 14.5 percent. Conversely, mothers who’d gained less than the recommended weight gave birth to children with a higher chance of developing obesity, at 19.5 percent.

And healthy moms especially should take note. Women of normal body mass index (BMI) who gained less than the recommended amount of weight were 63 percent more likely than others to bear a child who became overweight or obese. Likewise, women with normal BMI who failed to gain the recommended weight during pregnancy were 80 percent more likely to birth a baby who develops a weight problem, senior researcher Monique M. Hedderson said in a news release.

"The stronger association we found among normal weight women who gained too much or too little weight during pregnancy suggests that perhaps weight gain in pregnancy may have an impact on the child that is independent of genetic factors," Hedderson said.

The womb apparently sets the pace for certain metabolic functions, says study leader Sneha Sridhar. "Gaining either too little or too much weight in pregnancy may permanently affect mechanisms that manage energy balance and metabolism in the offspring, such as appetite control and energy expenditure," she said. "This could potentially have long-term effects on the child's subsequent growth and weight."

The researchers used BMI and pregnancy weight-gain recommendations from the Institute of Medicine, a nonprofit think-tank based in Washington, D.C. For obese women with BMIs of 30 or higher, health experts there recommend neonatal weight gain of 11 to 20 pounds, with 15 to 25 pounds for overweight women. Women who are underweight should gain the most at 28 to 40 pounds.

The researchers also defined childhood obesity at ages 2 and 5 as greater than the 85th percentile of child growth standards from the Centers for Disease Control and Prevention.