CONCORD — The state Supreme Court ruled a state appeals board was wrong under state law when it denied an injured worker’s request to be reimbursed for medical marijuana but it left open the question of whether the reimbursement is permitted under federal law.

The court sent the case back to the New Hampshire Compensation Appeals Board for further consideration.

The unanimous decision said state law didn’t bar Andrew Panaggio — a former employee of the W.R. Grace Company who suffered a serious job-related back injury in 1991 — from getting reimbursed for medical marijuana.

“Accordingly, because the board found that Panaggio’s use of medical marijuana is reasonable, medically necessary, and causally related to his work injury, we hold that the board erred when it determined that the insurance carrier is prohibited from reimbursing Panaggio for the cost of purchasing medical marijuana,” Associate Justice James Bassett wrote in the decision, dated Thursday.

But the court said questions remain regarding federal law.

“Because the board’s order fails to sufficiently articulate the law that supports the board’s legal conclusion and fails to provide an adequate explanation of its reasoning regarding federal law, it is impossible for us to discern the basis for the board’s decision sufficient for us to conduct meaningful review,” the ruling said.

The board concluded the insurance carrier was not able to provide medical marijuana and that possession of marijuana was still a federal crime.

“It’s a green light all around for my client on state law,” said Panaggio’s attorney, Jared O’Connor, a partner with Shaheen & Gordon. “Now, the only question is whether federal law stands in the way.”

O’Connor said he expects the appeals board to take up the case in three to five months and expects the losing side to appeal to the Supreme Court.

Boston attorney Robert Martin, who represented W.R. Grace & Company, didn’t immediately return a phone message.

When the state’s medical marijuana dispensaries opened in 2016, Panaggio was certified for the program by his primary care provider.

He purchased 14 grams of therapeutic cannabis at Sanctuary ATC in Plymouth and sent the bill for $170, along with qualifying paperwork, to his workers compensation insurance carrier, which denied the claim on the basis that medical marijuana was not “reasonable, necessary or causally related to the injury,” according to court documents.