A new study says that prenatal exposure to peanuts and tree nuts is actually good for kids.

Pregnant women are full of questions about what is best for their babies. Many questions involve nutrition because what a woman eats during pregnancy can affect her child’s health outside the womb. One major source of diet anxiety is peanuts and tree nuts, which have been linked to a growing number of allergies in children.

But a new study published in JAMA Pediatrics suggests that not only is eating peanuts and tree nuts during pregnancy safe for your child, but it may even be beneficial.

Despite the many conflicting arguments about food safety during pregnancy, the study authors argue that “early allergen exposure increases the likelihood of tolerance and thereby lowers the risk of childhood food allergy.”

Learn About Common Allergies in Kids »

Researchers followed nearly 11,000 participants in the Growing Up Today Study II, babies born between January 1, 1990, and December 31, 1994. Their mothers reported their diets during or shortly before or after pregnancy as part of the Nurses’ Health Study II. The researchers found that peanut/tree nut (P/TN) allergy incidence was significantly lower among the children of mothers who ate more nuts during pregnancy.

“This study adds to the emerging body of evidence that early introduction of food allergens leads to the development of tolerance to these food allergens, reducing the risk of developing food allergies,” said study author Dr. Michael Young, an associate professor of ophthalmology at Harvard Medical School. “The timing of the exposure to the developing immune system seems key, and important in how food allergies develop.”

Increasing rates of nut allergies in the U.S. remain a mystery. According to a 2010 study, childhood peanut allergies have more than tripled, from 0.4 percent of kids in 1997 to 1.4 percent in 2010, and peanut and tree nut allergies tend to overlap.

“With the recent increase in childhood food allergies, it is no surprise that women are seeking added guidance on whether diet during pregnancy can influence their child’s risk of developing food allergy,” said Dr. Ruchi Gupta, an associate professor of pediatrics at Northwestern University Feinberg School of Medicine, in an editorial published alongside the new study.

Know the Symptoms of a Peanut Allergy »

“Yet, guidelines, experts, and the science itself continue to change at a rate that leaves women confused,” she added. “For example, recommendations regarding the ingestion of potentially allergenic foods during pregnancy have flip-flopped for more than a decade.”

Gupta sees the value of a pregnancy diet rich in peanuts and tree nuts.

“Once we have a better understanding of the why, we will then be able to more confidently give advice and develop more specific preventive recommendations. For now, though, guidelines stand: pregnant women should not eliminate nuts from their diet as peanuts are a good source of protein and also provide folic acid, which could potentially prevent both neural tube defects and nut sensitization,” she wrote.

The issue of whether very early exposure to allergens is safe for young children is not completely settled, but the results of this study are promising.

“Additional prospective studies are needed to replicate this finding,” the researchers wrote. “In the meantime, our data support the recent decisions to rescind recommendations that all mothers avoid P/TN during pregnancy and breastfeeding.”

Find the Best Treatments for Your Food Allergy »

Gupta agrees, giving expectant mothers the green light to enjoy nuts in her editorial.

“So, to provide guidance in how to respond to the age-old question ‘To eat or not to eat?’ mothers-to-be should feel free to curb their cravings with a dollop of peanut butter!” she wrote.