Updated

Medical marijuana users are immune from criminal prosecution in California state courts under a ruling by the state's Supreme Court.

Under California law, possessing or growing marijuana "is no more criminal -- so long as its conditions are satisfied -- than the possession and acquisition of any prescription drug with a doctor's prescription," the California Supreme Court ruled Thursday.

Writing for the unanimous court, Chief Justice Ronald George said a section of California law "reasonably must be interpreted to grant a defendant a limited immunity from prosecution."

Users of medical marijuana, however, are still subject to prosecution under federal law.

The ruling stems from the arrest and conviction of Myron Mower, who uses marijuana to alleviate complications from diabetes. Mower was arrested in 1997 and convicted of possessing and cultivating marijuana.

The appeals court affirmed Mower's conviction. The ruling on Thursday sent the case back to the appeals court for a new trial.

California was the first state to approve medical marijuana in 1996 with the passage of Proposition 215. But the U.S. Supreme Court said last year that it's illegal to sell or possess marijuana for medical use.

California Attorney General Bill Lockyer, whose office prosecuted the case, applauded the state Supreme Court decision.

"As a supporter of Proposition 215, I believe that the court's decision strikes an appropriate balance in helping to ensure that truly needy patients whose doctors have recommended medical marijuana to alleviate pain and suffering related to serious illnesses will have access to this medicine under California law," he said in a written statement.