HARRISBURG - More than 21/2 years ago, in one of her first treks to the Capitol, Cara Salemme heard that she was wasting her time: Pennsylvania would never legalize medical marijuana, her state representative told her.

Still, the York County mother came back again and again, patiently and persistently explaining how the medicine could help son Jackson cope with terrifying and recurring epileptic seizures.

"It's your child," she said. "What else are you going to change the world for?"

On Wednesday, after years of lobbying and a frantic final few weeks of uncertainty, Salemme and hundreds of advocates could celebrate.

The House joined the Senate in agreeing to legalize medical marijuana, which will give Salemme's son and others access to what they say is a safe and effective way to treat chronic and painful ailments.

Gov. Wolf, who has always supported the initiative, said he would sign the bill into law Sunday in the Capitol Rotunda. Pennsylvania will become the 24th state to approve medical cannabis.

The 149-46 vote followed a whirlwind legislative session and the near-collapse of the bill - which passed the Senate earlier this year but was revised by the House, tweaked by the Senate, and again returned to the House.

House Majority Leader Dave Reed (R., Indiana) hailed what he said was a bipartisan effort to overcome years of obstacles.

"At one time, I was opposed to the idea of allowing doctors to prescribe medical marijuana," said Reed, echoing a once-widely held Republican position. "But after researching the issue, reviewing the laws in other states, and reading about the struggles of families the drug would help, I came to realize that it is wrong to withhold something that could benefit so many."

Watching Wednesday with tears in her eyes was Jessica Hawkins of Pittsburgh, whose 11-year-old daughter, Antania, has Dravet syndrome, a rare form of intractable epilepsy that begins in infancy.

"It's not like a scrape, where you can kiss it and make it better," said Hawkins, who said she took Antania to Colorado to get medical marijuana, which she said helped cut down on the more than 100 seizures she has a day. "There is nothing you can do."

The law will allow people suffering from cancer, epilepsy, multiple sclerosis, seizures, and other conditions to access medical marijuana in pill, oil, or ointment form at dispensaries statewide. It would not be able to be smoked.

The legislation calls for creating a complex regulatory process for what essentially would become a new industry in Pennsylvania, with dozens of dispensaries, at least hundreds of workers, and potentially thousands of patients. The Department of Health is expected to start the process with an advisory board; putting all the pieces in place means it could be 18 months or longer before patients actually have access.

But Sens. Daylin Leach (D., Montgomery) and Mike Folmer (R., Lebanon) noted the law includes a "safe haven" provision to quickly allow families with children under 18 to access medical marijuana - for instance, from other states where it is legal - without fear of prosecution. Temporary regulations are also expected to be written to permit adults to access it if they can demonstrate they suffer from one of the 17 conditions listed in the legislation.

Once it is running, the system would issue patients identification cards to access medical marijuana from one of 150 dispensaries statewide. Those cards would have to be renewed annually. Doctors prescribing the treatment will have to register as practitioners.

Dispensaries, as well as those who grow and process medical cannabis, have to be licensed by the state, and pay hefty registration and renewal fees. A 5 percent tax would also be imposed on the gross receipts from the sale of medical marijuana by a grower to a dispensary.

Leach, among the bill's biggest backers, called it "the most significant piece of social policy enacted in Pennsylvania" in generations.

"Marijuana is medicine and it's coming to Pennsylvania," he said at a news conference with Wolf after the vote. "Everyone can get sick, and in such a circumstance everyone would want medicine that could make them better."

To the end, the bill's critics kept up their opposition - including arguing that the law conflicts with federal policy because the U.S. Food and Drug Administration has not approved marijuana for medicinal purposes.

"What an unprecedented thing we are doing here today, bypassing the FDA process," Rep. Matt Baker (R., Bradford), who tried to block the legislation, said during the House floor debate Wednesday.

Baker said the state would soon face "many challenges and serious consequences and concerns," including product safety and quality control.

He and others have also said they believe this will open the door to legalizing recreational marijuana.

Rep. Russ Diamond (R., Dauphin) disagreed.

"Sick people do not want to get high," he said. "They want to get better."

717-787-5934@AngelasInk