House and Senate lawmakers and Gov. Mark Dayton struck a deal to allow suffering Minnesotans use of marijuana to relieve their pain.

"It's taking every part of me not to cry right now," said Jeremy Pauling, whose 7-year-old daughter suffers from seizures that could be helped with marijuana. "It's been a long road but now I can get my daughter the medicine she needs."

The compromise would require patients to certify they are qualified to receive cannabis to get the drug from one of eight distribution centers. Only two manufacturing sites would be permitted under the deal.

While that deal may not go far enough for supporters of a broader measure, it still will make Minnesota the 22nd state to legalize medical marijuana.

"The public supports this and the time had come to take this important step," said Sen. Scott Dibble, DFL-Minneapolis.

The measure, which backers say is one of the strictest in the nation, won support from Dayton and little opposition from law enforcement. More expansive measures that were at play in the Legislature failed to overcome opposition from law enforcement.

For families who had long appealed to legislators to allow them use of marijuana, the process was difficult.

"It's been like the wildest roller coaster I've ever been on," said Pauling.

The final agreement, expected to win full approval from the Legislature on Friday, could allow about 5,000 Minnesotans to use the drug without violating state laws.

The patients would need to certify that they have one of nine conditions, including cancer, Glaucoma, HIV/AIDS, Tourette's Syndrome, ALS, seizures, severe and persistent muscle spasm, Crohn's Disease and certain terminal illnesses. Disappointing some advocates, the measure would not extend usage to post traumatic stress syndrome or all intractable pain.

It would not allow smoking of leaf marijuana.

Dayton, who had been a skeptic of more expansive proposals, said he approved of the plan.

"I look forward to signing this bill into law. And I pledge that my administration, led by (Health Commissioner Ed) Ehlinger, will do everything possible to implement it as swiftly and successfully, as is possible," he said in a statement.

Once the deal is signed into law, patients would be able to get the drug by July 1, 2015.

Photo: A bipartisan group of Minnesota lawmakers announced a deal on medical marijuana, with families who hope for relief standing nearby/Source: Glen Stubbe