COLUMBIA, S.C. (AP) — South Carolina senators Wednesday approved the use of medical marijuana in the state on a 28-15 vote that finished a Republican senator’s seven-year quest to pass the proposal, but the legislation still has some hurdles to pass to become law.

The proposal had both bipartisan support and opposition in the Republican-dominated Senate. Seventeen Republicans voted for the bill and 10 opposed it. It faces one more routine vote before going to the state House where it has never been taken up.

The bill has been a crusade for Sen. Tom Davis for seven years and several senators said his tireless attempts to change their minds turned them into supporters. Back in 2016, the Beaufort Republican would take the floor of the Senate every day during the short period for senators to make personal speeches, opportunities Davis would use to spotlight someone suffering without medical marijuana.

Davis said his proposal would be one of the most conservative among the 37 states that have approved medical marijuana, including Mississippi, which signed a bill into law last week.

The proposal specifies the illnesses that could be treated, including cancer, multiple sclerosis, glaucoma, sickle cell anemia and autism. And the marijuana could be obtained only through specially chosen pharmacies.

Smoking the drug would remain illegal in South Carolina. Instead, patients would have to use oils, salves, patches or vaporizers. Doctors would have to meet patients in person and patients could only get a two-week supply at one time.

Senators considered more than 65 changes to the bill over seven days of debate. Davis welcomed the work, saying he wanted to make his bill better.

Amendments that passed included giving preference to South Carolina farmers to grow the marijuana for the program to charging a 6% sales tax to allowing cities or counties to prohibit legal medical marijuana in their jurisdiction.

The bill has been the only major item debated by the Senate since Jan. 26.

Many law enforcement agencies and religious groups oppose the bill. Critics feared it would set up what some called a “marijuana industrial complex” and allow the state to quickly shift to permitting recreational marijuana use.

Opponents also said it would make it easier for teenagers to get marijuana prescribed to family members or friends.

“They are either going to give it to them, they are going to sell it to them or they are going to take it from them,” said Sen. Kevin Johnson, a Democrat from Manning.

Davis said plenty of people are already using marijuana illegally and will continue doing so if his bill is rejected.

Sen. Sean Bennett said he decided in the final hour of debate to support the bill, but he worried all the changes created a “Frankenstein monster.”

“I think the public is going to be a little surprised what is in it and what is not in it,” said Bennett, a Republican from Summerville.

The bill is set to move next to the House, which must approve it before the General Assembly session ends in May — or it will die.

Gov. Henry McMaster has said his position on medical marijuana is evolving, but he refused to say Tuesday what he might do if the bill reaches his desk.

“Premature to say,” the governor told reporters. “I’d have to see what is in the bill.”