A new drug could become the first-ever protective treatment for the more than one million children in the U.S. who suffer from peanut allergies.

In a phase-three trial, the results of which were published in the New England Journal of Medicine, the peanut-derived drug AR101 helped some children with severe peanut allergies tolerate the equivalent of two peanut kernels without serious side effects. Prior to taking the drug, none of these children could safely ingest more than the equivalent of one-tenth of a kernel.

AR101, which is manufactured by Aimmune Therapeutics (the company also designed and funded the study), delivers a controlled daily dose of peanut protein, with the goal of building tolerance over time and minimizing the dangers of accidental peanut exposure. Tolerance-building is a well-established strategy for both preventing new peanut allergies and curtailing existing ones, but there is not currently a drug that provides this effect.

AR101 still needs to secure Food and Drug Administration (FDA) approval. But the results of the new trial are encouraging, especially since peanut allergies are growing more common, affecting about 2.5% of American children, according to recent estimates.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

About 500 children ages 4 to 17, as well as 50 adults, participated in the study. Data was collected in 10 countries in North America and Europe. Participants were randomly assigned to receive either gradually increasing doses of AR101 or a placebo; both were given as powders that could be mixed with food. People taking the active drug gradually increased their daily dose every two weeks. Once they were taking 300 milligrams per day, they maintained this dose for 24 weeks.

By the end of the study, about 67% of the 372 children taking the active drug were able to ingest 600 milligrams of peanut protein — the equivalent of two kernels — without significant allergy symptoms, compared to just 4% of the 124 children in the placebo group. And half of the children in the drug group could safely consume 1,000 milligrams of peanut protein — the equivalent of three or four kernels — compared to roughly 2% of those in the placebo group. When they did have allergy symptoms, kids taking AR101 experienced less severe reactions than peers in the placebo group.

Among adults, however, the differences between the two groups were less significant, suggesting that the drug may be most effective for children.

While the results were promising, some people in the study did still experience serious allergic reactions. Almost 6% of people in the active drug group experienced “serious or severe adverse events” during the study, compared to almost 2% of those in the placebo group. None of these reactions were fatal or life-threatening, but 43 people in the drug group and three in the placebo group withdrew from the trial for reasons ranging from systemic allergic reactions to gastrointestinal symptoms.

Next, the FDA will review safety and efficacy data and decide whether to approve the drug. If the FDA grants Aimmune approval, the company says the therapy will be available by prescription as soon as late 2019.

If it hits that target, AR101 could be the first approved peanut allergy treatment on the market. Australian researchers last year found that a combination immunotherapy and probiotic allowed some children with peanut allergies to safely eat peanuts, but no such treatment is currently available for consumers.

Write to Jamie Ducharme at jamie.ducharme@time.com.