U.S. health regulators on Monday approved the first prescription drug made from marijuana, a milestone that could spur more research into a drug that remains illegal under federal law, despite growing legalization for recreational and medical use.

The Food and Drug Administration approved the medication, called Epidiolex, to treat two rare forms of epilepsy in patients 2 years and older. But it’s not quite medical marijuana.

The strawberry-flavored syrup is a purified form of a chemical ingredient found in the cannabis plant — but not the one that gets users high. It’s not yet clear why the ingredient, called cannabidiol, or CBD, reduces seizures in some people with epilepsy.

British drugmaker GW Pharmaceuticals studied the drug in more than 500 children and adults with hard-to-treat seizures, overcoming numerous legal hurdles that have long stymied research into cannabis.

FDA officials said the drug reduced seizures when combined with older epilepsy drugs. FDA chief Scott Gottlieb said his agency had supported research on cannabis-derived products “for many years.”

“This approval serves as a reminder that sound development programs that properly evaluate active ingredients contained in marijuana can lead to important medical therapies,” Gottlieb told reporters.

The FDA has previously approved synthetic versions of another cannabis ingredient for medical use, including severe weight loss in patients with HIV.

Epidiolex is essentially a pharmaceutical-grade version CBD oil, which some parents already use to treat children with epilepsy. CBD is one of more than 100 chemicals found in marijuana. It doesn’t contain THC, the ingredient that gives marijuana its mind-altering effect.

Physicians say it’s important to have a consistent, government-regulated version.

“I’m really happy we have a product that will be much cleaner and one that I know what it is,” said Dr. Ellaine Wirrell, director of the Mayo Clinic‘s program for childhood epilepsy. “In the artisanal products there’s often a huge variation in doses from bottle to bottle depending on where you get it.”

Side effects with the drug include diarrhea, vomiting, fatigue and sleep problems.

Several years ago, Allison Hendershot considered relocating her family to Colorado, one of the first states to legalize marijuana and home to a large network of CBD producers and providers. Her 13-year-old daughter, Molly, has suffered from severe seizures since she was 4 months old. But then Hendershot learned about a trial of Epidiolex at New York University.

“I preferred this to some of those other options because it’s is a commercial product that has gone through rigorous testing,” said Hendershot, who lives in Rochester, New York.

Since receiving Epidiolex, Hendershot says her daughter has been able to concentrate more and has had fewer “drop” seizures — in which her entire body goes limp and collapses.

CBD oil is currently sold online and in specialty shops across the U.S., though its legal status remains murky. Most producers say their oil is made from hemp, a plant in the cannabis family that contains little THC and can be legally farmed in a number of states for clothing, food and other uses.

The immediate impact of Monday’s approval on these products is unclear.

FDA’s Gottlieb warned about the use of CBD products with “unproven medical claims.”

“The promotion and use of these unapproved products may keep some patients from accessing appropriate, recognized therapies to treat serious and even fatal diseases,” Gottlieb said.