A Coeur d'Alene woman has won the right to challenge drug charges against her on grounds that she uses marijuana out of medical necessity.

The Idaho Supreme Court on Tuesday unanimously voided the drug conviction of Lynn Jane Hastings on grounds that she should have been allowed to use the so-called common law defense of necessity to defend herself against the charges.But the court stopped short of creating the special defense of medical necessity that is in effect in a number of other states.

Justice Charles McDevitt, writing for the court, said Hastings should have the opportunity to convince the court that her apparent illegal use of marijuana was justified because it is the only substance that will relieve the pain and muscle spasms associated with rheumatoid arthritis.

Marijuana is also used to releave the pressure suffered by some victims of glaucoma.

In March 1989, police arrested Hastings after searching her home and finding about a dozen marijuana plants growing in the basement. First District Judge Gary Haman denied the use of a necessity defense on grounds that it was not valid in Idaho. But he effectively invited Hastings to challenge that ruling by allowing her to enter a guilty plea conditioned on her right to appeal his necessity defense ruling.

McDevitt said the necessity defense recognized in English common law has long been accepted as the rule of decision in state courts. While most often used in the context of prison escapes on grounds the inmate's life was in danger, he said it "has also been raised in a variety of other circumstances."

Among those cases, he wrote, was won in which a woman defended herself against a drunken driving charge because she had been assaulted and was driving herself to the hospital when stopped.