CONCORD, N.H. — A woman with late-stage lung cancer can seek to buy medical marijuana in Maine before dispensaries open in New Hampshire, a judge ruled Tuesday.

New Hampshire lawmakers approved the use of marijuana by people suffering from a limited number of diseases and medical conditions more than two years ago, but the first four dispensaries won’t open until next year. Linda Horan, 64, says she might be dead by then and sued the state in hopes of getting an identification card that would allow her to purchase marijuana in Maine instead.

Linda Horan, a New Hampshire resident, went to court to allow her to buy medical marijuana in Maine. The Associated Press

Lawyers for the state argued that issuing Horan an identification card now would undermine New Hampshire’s need to control distribution, but a judge sided with Horan and ordered the state to process her application and issue a card if it is approved. The state, which has 15 days to approve or deny an application, did not dispute that Horan would be entitled to a card.

“I’m over the moon. It really hasn’t sunk in,” Horan said. “I’m in tears – tears of joy. Not just for me, but for everyone else who will have the opportunity to get the medicine they need. If I’m going down, I’m going down swinging.”

Horan, a retired telephone worker and longtime labor activist from Alstead, was diagnosed in July with lung cancer that has grown rapidly since then and spread to her lymph nodes and brain. Her doctors have told her that marijuana could help reduce nausea and minimize the need to use narcotics to control pain.

“She is suffering from a painful, terminal disease and is also undergoing chemotherapy. There is no dispute that cannabis can ameliorate some of her suffering,” wrote Judge Richard McNamara. “She will suffer irreparable harm if relief is not granted.”

Horan’s attorney, Paul Twomey, called his client a hero.

“Facing death, she has chosen to fight for the rights of all the critically ill patients in New Hampshire, who should not have to fear arrest because they are sick,” he said. “She may be dying, but we all owe her our thanks for showing us how to live.”

Assistant Attorney General Francis Fredericks could not be reached for comment Tuesday after his office closed.

At an earlier hearing, he said the state had to balance the patient’s need to obtain medical marijuana with the state’s need to control its distribution at its alternative treatment centers.

“New Hampshire should not have to abandon its protocol and its plan because Maine is a step ahead,” he said.

In his ruling, McNamara rejected the state’s argument that allowing Horan to possess marijuana from Maine would destroy the tight distribution controls lawmakers envisioned in passing the law. He noted that the law allows visitors from other states to obtain marijuana in New Hampshire, suggesting that lawmakers knew other states would have similar provisions.

Send questions/comments to the editors.