Believe it or not, there was a time when PB&Js were a lunchroom staple without anyone thinking twice. Nowadays, peanut products are banned or restricted at many schools and organizations because of the seriousness of peanut allergies — a potentially deadly condition that has become more and more common in the past few decades, doubling in the past 10 years alone. According to the American Academy of Pediatrics (AAP), peanut allergy is the leading cause of food allergy-related death in the U.S.

It was previously thought that delaying the introduction of peanuts into a child’s diet would minimize reactions and allergies, and older guidelines recommended that no peanut products be fed to children until either age two (2010 guidelines) or age three (2000 guidelines).

But we’ve had some good news on the peanut allergy front: Recent studies show that some children may benefit from earlier exposure, depending on their allergy profile. The AAP updated their guidelines in 2017 to reflect the most recent research, based on recommendations from the National Institute of Allergy and Infectious Disease, who found that early introduction and regular feeding of peanut products may actually prevent children from developing a peanut allergy.

Infants who have eczema and/or an egg allergy are considered at high risk for developing a peanut allergy. The current advice separates children into three different risk categories, with different approaches for each:

Group 1— Babies with severe eczema and/or egg allergy: Parents should speak with their child’s doctor (preferably early, at the 2- or 4-month checkup) about how and when to give peanut products in the future. Testing for peanut allergies is strongly advised, and it is recommended to ask your physician about introducing peanut products between 4 and 6 months of age to help prevent future severe peanut allergy. Your doctor may require that the first exposure to peanut products take place in the doctor’s office or other medical setting rather than at home, in case of a reaction.

Group 2 — Babies with mild to moderate eczema: No testing is needed, but parents should still consult with the doctor about when to first give peanut products. Generally, after introducing other solid foods, these babies should have their first peanut exposure at around 6 months. If well-tolerated, peanut products should be given as a regular part of the diet after that to prevent an allergy from developing.

Group 3 — Babies with no eczema or food allergies: Timing is not as critical for these children, and they can try peanut products freely whenever parents would like to introduce them, after other solid foods have been introduced and well-tolerated.

For all babies, it’s important to give only infant-safe forms of peanut products, like thinned-out creamy peanut butter mixed into cereal or yogurt or other non-chunky foods that contain peanut. Never give whole peanuts to a child until at least age 4 — not only are they choking hazards, they can potentially be inhaled into the lungs.

Follow AAP guidelines for the introduction of solid foods, including allergenic foods, and always consult your doctor about recommendations specifically for your child.