A Pima County Superior Court judge may have paved the way for the state’s more than 52,000 medical marijuana users to get into business of selling the drug, at least to each other.

In a ruling earlier this month, Judge Richard Fields threw out charges against Jeremy Matlock, ruling the wording of the 2010 voter-approved law does not make what he did illegal.

Fields said the statute is poorly worded and subject to interpretation.

The judge said the language of the statute is so vague it could be read that medical marijuana users can sell to other users without fear of breaking the law. And that, Fields wrote, means Matlock could not be prosecuted for what he did.

At this point, the ruling affects only Matlock.

Kellie Johnson, the chief criminal deputy for the Pima County Attorney’s Office, said her agency plans to appeal. And if higher courts say Fields is right, that would set precedent for the entire state.

That possibility alarms state health director Will Humble.

He said it is not his job to enforce criminal laws. But Humble said the ruling undermines his ability to take away medical-marijuana cards from patients he believes are illegally selling the drug.

Johnson said if nothing else, prosecutors statewide need some guidance on what the law actually allows.

Matlock was charged last year with illegally selling marijuana after he posted an ad on Craigslist offering to give medical marijuana to other cardholders but seeking a donation of $25 per plant.

In court filings, his attorney, Sarah Bullard, a deputy Pima County public defender, pointed out Matlock has a card from the state that allows him to possess the drug, and argued the Arizona Medical Marijuana Act specifically permits him to transfer marijuana to any other medical-marijuana patient.

Johnson said prosecutors read the law to only allow patient-to-patient transfers if no money changes hands.

That left it up to Fields to interpret a 59-word provision — one without a single comma or other punctuation — to determine what is and is not legal.

With that language unclear, Fields looked to another provision in the same law that makes it a crime for any medical-marijuana cardholder to sell the drug “to a person who is not allowed to possess marijuana for medical purposes.” By extension, he said, the law “necessarily implies that a qualifying patient can sell marijuana” to someone who is entitled to use it.

Beyond that, Fields noted that 59-word provision implies that to violate the law, someone needs to do two things: transfer marijuana for something of value and also know that the buyer will be getting more than the 2ƒ ounces of the drug to which Arizona law entitles users every two weeks.

“In this case, the defendant did not transfer more than the allowable amount,” Fields wrote, with Bullard saying the undercover Tucson Police Department officer left with only three immature plants. “There is no way to meet the ‘knowing’ element.”

Fields said his conclusion was necessary because of the way the initiative was written by the groups supporting medical marijuana.

“The fact of the matter is that the statute is very poorly drafted and needs a lot of work,” he wrote.

Humble said the ruling could undermine a key point in the law voters approved in 2010, which allows those with a doctor’s recommendation and a state-issued ID card to obtain up to 2ƒ ounces of marijuana every two weeks. The health director said he believes voters narrowly approved the law at least in part because patients would have to obtain the drug from one of several dozen state-regulated dispensaries.

He said Fields’ ruling, unless overturned, creates all sorts of enforcement problems.

Star reporter Patrick McNamara contributed to this report.