Newborn babies who gain weight rapidly in the first week of life are more likely to become obese later on, US researchers believe.
Gaining too much weight can be risky, the study says.
Babies often struggle to put on weight in the first week as they adjust to their new surroundings.
But researchers found for every 100g (3.5oz) gained, the risk of being overweight as an adult rose by 10%.
Breastfeeding may minimise the risk, the journal Circulation reported.
All 653 people who took part in the study were formula fed when they were born in the 1970s and 1980s, and as such were more likely to put on weight than breastfed babies.
Researchers from The Children's Hospital of Philadelphia, the University of Pennsylvania and the University of Iowa found weight gain in the first week was crucial in determining future levels of obesity.
They said the findings could be used to combat the increasing levels of obesity across the world.
In the UK adult obesity rates have almost quadrupled in the last 25 years with nearly one in four adults classed as obese.
And it is estimated that one in 10 six-year-olds are obese - three times higher than 20 years ago.
Report author Dr Nicholas Stettler said: "Normal weight gain is desirable for infants.
"Babies double their birth weight during the first four to six months.
"During the first week of life, however, a too-rapid gain in weight may increase the risk of figure weight problems."
He added no specific recommendation could be made about what level of weight gain was best, but he said exclusively breastfeeding in the first few months could lower the risk of obesity later in life.
Consultant neonatologist Dr Andrew Lyon, honorary secretary of the British Association of Perinatal Medicine, said: "Size, diet and weight gain seem to very important in determining future growth and risks of cardiovascular and possibly other diseases.
"More work is needed to try and define the optimum growth of the foetus and newborn baby but this recent study adds some more interesting information."
And Rosie Dodds, of the National Childbirth Trust, said past studies had shown breastfeeding helped reduced the risk of obesity.
"It may be that babies pull off when they have had enough, whereas there is a tendency to encourage a baby to finish a bottle and thereby get them used to taking more.
"Or it could be a component of the breast milk. It is not clear yet."