Parents long avoided giving kids peanuts. Now, a surprising new way to shun nut allergies.

Children who are fed peanut products as infants and toddlers are much less likely to develop a peanut allergy as adolescents, a new study found.

Children who consume peanut products as infants until age 5 were 71% less likely to have a peanut allergy at age 13, according to a study sponsored and co-funded by the National Institutes of Health’s National Institute of Allergy and Infectious Diseases.

The study, published Tuesday in the medical journal NEJM Evidence, builds on 2015 research that reported children who are fed at least 6 grams of peanut protein per week were much less likely to develop peanut allergies when compared to a group of infants who avoided peanut products altogether.

Jeanne Marrazzo, NIAID's director, said the study "turns our traditional thinking about food allergy on its head."

"Traditionally, all of our intervention has been built on avoidance – don't let your kid go near peanuts if there's any sign," of potential allergy," Marrazzo said.

But she said the new research is a "game changer" because it demonstrates children can build protection from peanut allergy if they consume peanut products from 4 to 6 months through age 5.

She said such early consumption of peanut products could prevent tens of thousands of cases of peanut allergy among young children.

The Learning Early About Peanut Allergy study enrolled more than 600 high-risk infants. Half of those children consumed peanut products from infancy until age 5. The other half avoided peanut products. The study, published in 2015, concluded such early consumption of peanut products reduced the risk of peanut allergy at age 5 by 81%.

The new study evaluated whether such early protection would extend into adolescence for children who chose to eat peanut products as much or as little as they wanted. Children who were found to be allergic during initial research were told to avoid peanuts.

The study team evaluated more than 500 children who were enrolled in the original study, including 255 who consumed peanuts and 253 who avoided peanuts.

Children were monitored as they ingested a minimum of 5 grams of peanut products – equal to more than 20 peanuts. Researchers concluded that the group who regularly consumed peanuts in their early years reduced their risk of peanut allergy in adolescence by 71% compared to the group who avoided peanuts.

Researchers said the frequency and amount of peanuts consumed varied widely in both groups. In other words, children who consumed peanuts in their beginning years had lasting protection even if they did not eat peanuts consistently through early adolescence.

Sung Poblete is CEO of Food Allergy Research & Education, a nonprofit that aims to improve the quality of life and health of those with food allergies.

Poblete said the new study is "hugely important" because it shows food can be used as preventive medicine.

"We say eat early, eat often, and that's exactly what this research demonstrates," said Poblete.

Poblete, however, said parents have been slow to introduce peanuts to children's diets, perhaps due to conflicting recommendations over the years.

In 2000, the American Academy of Pediatrics recommended delaying peanut consumption until the age of 3. In 2008, the organization rescinded its advice to delay introducing peanuts until age three.

In a 2019 update, the pediatricians' group said there is "no evidence" that delaying foods such as peanuts, eggs, and fish beyond four to six months can prevent disease. "There is now evidence that early introduction of peanuts may prevent peanut allergy,' the updated guidance said.

This article originally appeared on USA TODAY: Peanut allergies can be avoided in children. Eating them helps.