A New Mexico judge ruled a detention center in Albuquerque cannot penalize qualifying medical marijuana patients for accessing cannabis while incarcerated.

District Court Judge Lucy Solimon’s ruling concerns the case of Joe Montaño, who recently served a 90-day sentence in home confinement. During his incarceration, correctional officers found him in possession of cannabis, which is legal for medical purposes in New Mexico but remains illegal at the federal level. Though Montaño is a medical marijuana patient, he was subsequently jailed for 30 days for violating the terms of his confinement.

Montaño’s case was taken up by Sen. Jacob Candelaria (D), who argued to the court that the 2007 Lynn and Erin Compassionate Use Act and a 2019 amendment protects the right of medical marijuana patients to use cannabis even if they’re incarcerated.

In a ruling which could set a precedent in such cases and force changes in correctional facilities, Solimon states Bernalillo County’s Metropolitan Detention Center “shall not penalize persons in custody or under the supervision of the Metropolitan Detention Center, including those in the Community Custody Program, for conduct allowed under the Lynn and Erin Compassionate Use Act.”

The amendment passed last year makes the protections in the Lynn and Erin Compassionate Use Act more explicit.

In words echoed by Judge Solimon, the amendment states that a “person who is serving a period of probation or parole or who is in custody or under the supervision of the state or a local government pending trial as part of a community supervision program shall not be penalized for conduct allowed under the Lynn and Erin Compassionate Use Act.”

Following the verdict, Sen. Candelaria said he will notify correctional facilities across New Mexico of the ruling and implore them not to penalize incarcerated medical marijuana patients for using cannabis.

“There’s no discretion under the Medical Cannabis Act. You must allow this,” he said to the Santa Fe New Mexican. “While the criminal industrial complex may have pushback or some concerns, take those to the legislature.”

“Because until such time as the legislature changes the law, the law is clear: You must under existing law provide incarcerated persons with the ability to access medical cannabis free from penalty. That’s the law,” he added.

It remains unclear whether state correctional facilities will willingly adopt the policy or if it could face further legal challenges through appeal. Candelaria would go further though, and argues government agencies have a duty of care over inmates and as such should provide and pay for whatever treatments are recommended by a physician.

“I absolutely do believe that jail and prison facilities have the responsibility to provide that medical care if it’s ordered by a physician, period,” he said to The Albuquerque Journal.

Montaño and Candelaria’s legal challenge was partly funded by Ultra Health, a New Mexican medical marijuana company.

“This ruling exemplifies the spirit of the Lynn and Erin Compassionate Use Act: cannabis is medicine and every patient deserves the legal right to access their medicine,” CEO Duke Rodriguez said in a press release.

New Mexico is one of a handful of states looking seriously at marijuana legalization this year, with Gov. Lujan Grisham urging the measure to help rebuild the state’s battered economy. A Joint Committee recently met to discuss the economic potential of legalizing cannabis, with action expected in the legislature in the next session.