SANTA ROSA, Calif. (AP) — A Northern California kindergartner can continue bringing her cannabis-based drug to her public school.

The Santa Rosa Press-Democrat reported Saturday that a judge in favor of 5-year-old Brooke Adams, who uses the drug as an emergency treatment for a rare form of epilepsy.

The Rincon Valley Union School District in Santa Rosa sought to ban it from school grounds. It argued the drug violates federal law. Children's medical marijuana use with a doctor's recommendation is legal in California. But all forms of marijuana use remain illegal under federal law.

A judge's temporary order permitted Brooke to start school in August while considering the district's objections. A nurse accompanies Brooke to school and has had to apply the oil three times to treat seizures.

The ruling Friday made the order permanent.