Corrections & Clarifications: Rodney Jones was found in possession of a jar containing 0.05 of an ounce of hashish. The amount of hashish was incorrect in a previous version of the story.

The long debate over whether medical marijuana extracts are legal in Arizona is over, after a ruling by the state Supreme Court. Extracts fall under the Arizona Medical Marijuana Act, the court ruled Tuesday.

The ruling comes after a 2016 conviction and sentencing of Rodney Jones, a registered medical marijuana patient who was found in possession of a jar containing 0.05 of an ounce of hashish in 2013.

Last year, the Arizona Court of Appeals ruled in June that medical marijuana extracts do not fall under the Arizona Medical Marijuana Act. Extracts are used in oils, or edibles, as well as in vaping.

The appeals court ruled Jones was not immune from prosecution. He was sentenced to serve 2½ years in jail for drug possession and possession of drug paraphernalia.

In its decision, the Arizona Supreme Court vacated Jones's conviction and sentence.

The ruling

The court said it disagreed with the state's argument that the act does not apply to resin or extracts.

The court said the act anticipates dispensaries will produce marijuana in its edible form and patients will be able to consume it in other ways besides smoking.

The court said it was "unpersuaded" by the state's argument that the act limited marijuana use to dried flowers.

"A plain reading of the relevant provisions compels our conclusion that AMMA protects the use of 'marijuana,' including resin, so long as the patient does not exceed the allowable amount and otherwise complies with the statutory requirements," the court ruled.

In court documents for the case involving Jones, former Arizona Department of Health Services Director Will Humble weighed in on his understanding of the state's medical marijuana act. He helped create the rules for the act, which voters passed in 2010.

“As we developed the rules, I always believed that extracts and preparations of marijuana (cannabis) were protected under Proposition 203,” he said in his court filing.

Robert Mandal, Jones's attorney, told The Arizona Republic his client, who still lives in Arizona, is happy about the court's decision.

"He is doing great," Mandal said. "He couldn't be more thrilled."

Mandal said the decision benefits all medical marijuana patients across the state.

Yavapai County Attorney Shelia Polk spoke out against the court's decision Tuesday. Jones was convicted in Yavapai County.

"Sadly, the Supreme Court rejected the Arizona Appeals Court's common-sense reasoning and its sound conclusion that hashish is a form of cannabis, which state law defines as distinct from the dried marijuana leaves," she said in a statement.

Lower courts have ruled on the issue in the past.

In 2014, a Maricopa County Superior Court judge ruled that 5-year-old Zander Welton could be treated with extracts for seizures, according to a report by The Associated Press.

Judge Katherine Cooper said in her ruling that the state law allowed qualifying patients to use extracts, including CBD oil.

The ACLU filed the lawsuit regarding Welton because Maricopa County Attorney Bill Montgomery and other law enforcement officials believed the act did not allow the use of extracts, according to the organization.

The impact

Many groups concerned with the case submitted opinions to the court, including the ACLU and the Arizona Attorneys for Criminal Justice.

Arizona Attorneys for Criminal Justice was concerned that patients who legally receive a medical marijuana card and go into a state-licensed dispensary could possibly be charged with a crime, according to attorney Sarah Mayhew.

The ACLU sent an opinion with numerous stories of families needing to use extracts for their children. Many children who use medical marijuana for treatment need to use extracts instead of smoking the leafy substance.

One family uses CBD oil and THC oil to treat their 2-year-old daughter who has a form of epilepsy called Dravet Syndrome. Her condition cannot be treated with most anti-seizure medications. Extracts have decreased the frequency and length of the child’s seizures, according to the court document.

“She now smiles and plays and is developing normally,” the family said in court documents.

Have thoughts about Arizona’s legal system? Reach criminal justice reporter Lauren Castle at Lauren.Castle@gannett.com. Follow her on Twitter: @Lauren_Castle.