The bill's drafters say it could take two years to write regulations and get retailers opened, but a provision allows parents to legally administer medical marijuana to their children before the bill takes effect in a month.

New research questions medical marijuana’s impact

The bill sets standards for tracking plants, certifying physicians and licensing growers, dispensaries and physicians. Patients could take marijuana in pill, oil, vapor, ointment or liquid form, but would not be able to legally obtain marijuana to smoke or grow.

Sen. Mike Vereb, a Republican, called on lawmakers to take on what he called "the number-one killer in Pennsylvania" - opioid abuse.

"Opioid abuse has no party, has no color, has no religion," Vereb said. "Let's face it, that's the killer. What we're doing today is the healer."

Among those celebrating the victory was parent Dana Ulrich, who has fought for legal access to the drug in the belief that it would help her 8-year-old daughter Lorelei, who has numerous seizures every day.

"I never doubted for one second that this day would come," she told the crowd, thanking patient advocates and caregivers as well as lawmakers and the governor. "When you get a group of truly dedicated people together, that have the same goal and the same mind and the same hearts, you can achieve anything."

Wolf called it "a great, great day for Pennsylvania, but more important, a great day for Pennsylvanians." He said he and lawmakers were responding not to a special interest group or to campaign contributors, but to "a real human need."

"When you have people who represent a cause as eloquently and in as heartfelt a way as the advocates for this have done, it shows that we can actually get something done that means something," Wolf said.