WEDNESDAY, Dec. 20, 2017 (HealthDay News) -- Overweight children often become obese adults, with attendant problems such as heart disease, diabetes and cancer.

But a new study suggests there are "critical windows" where that path to weight gain can be changed.

The study, involving more than 2,700 Finnish adults, found what many studies have shown before: Childhood body mass index, or BMI, is a good predictor of adulthood obesity.

People who became obese as adults tended to already be heavier than their peers by the age of 6. That suggests, the researchers said, that early childhood is a key period for preventing obesity later on.

But the findings also point to a "second critical window," said lead study author Marie-Jeanne Buscot, a postdoctoral researcher at the University of Tasmania in Australia.

The teenage years appeared vital, too, the study found.

That's because not everyone who was heavy as a young child became an obese adult. Those who didn't were able to slow their weight gain down by early adulthood: Among girls who avoided obesity, weight gain plateaued by age 16, on average. Among boys, that happened around age 21.

In contrast, young people who remained obese did not see their weight gain slow until they were 25, on average. The situation was similar for normal-weight kids who became obese adults; their weight gain hit a plateau around age 30.

Researchers have known that BMI -- a ratio of height to weight used to measure overweight or obesity -- in early childhood is strongly linked to adulthood obesity, Buscot explained. This study shows the importance of kids' weight-gain "trajectory" she said.

"It is not only the time before age 6, but also the rate at which children gain weight across the entire period of childhood that is important," Buscot said.

The findings, published online Dec. 19 in the journal Pediatrics, are based on 31 years of data for 2,717 adults in Finland. All had their BMI measured up to eight times between childhood and adulthood.

Most of the study group had a normal BMI in childhood and were not obese as adults. But 5 percent were heavy as kids and obese as adults, while 15 percent became obese only in adulthood.