COLUMBIA, S.C. (AP) — A seven-year fight to pass a medical marijuana bill may have abruptly ended Wednesday in South Carolina when a House leader ruled the proposal contains an unconstitutional tax increase and cannot be considered further.

The decision shocked leaders in the state Senate and may have repercussions well beyond failing to make South Carolina one of about 40 states allowing patients to use marijuana as medicine.

Senate leaders, stunned to see years of hard work by respected colleague Sen. Tom Davis cast aside with no debate, said their deteriorating relationship with the House will need to be repaired after the decision. The chambers are more than $1 billion apart on a budget and threatening each other over an early voting bill.

The decision “will likely have significant consequences” between the Senate and the House and hopefully ”cooler heads can prevail,” Senate Majority Leader Shane Massey said as a stunned Davis walked around talking to his colleagues.

Davis said he understood he had about 70 votes — roughly 10 more than he needed to pass the legislation. The Republican said he would spend Wednesday night looking for some other bill he might be able to attach a medical marijuana plan to that wouldn’t get caught up in such a ruling. Backers are seeking to get the legislation through the General Assembly in the four days remaining in the session.

“We suffered a setback procedurally in the House today. I can’t cry about it. I can’t pout about it. I can’t go back and lash out and hurt other people’s bills. That’s not productive,” Davis said.

The House appeared to be ready to debate the bill Wednesday. One thousand amendments organized in binders had been rolled on a cart to the front of the chamber. Davis, who has fought for the bill since 2015 was in the back of the House.

But just before debate began, one of the chief opponents of the bill asked Speaker Pro Tem Tommy Pope to rule that a 6% fee on medical marijuana sales to pay for regulations in the bill creates a new tax — a power only allowed under the state constitution by a bill that originates in the House.

Davis’ bill started in the Senate and — after considering the point for nearly three hours — Pope ruled the bill was out of order, killing it.

“This bill levies taxes in the strictest sense of the word. It is a core ingredient. It established a separate tax to create the whole infrastructure,” Pope said.

House members voted 59-55 to back Pope’s ruling, meaning this medical marijuana bill is dead for this year.

Davis crafted his proposal to be as conservative as possible. The bill specifies the illnesses that could be treated, including cancer, multiple sclerosis, glaucoma, sickle cell anemia and autism. It also states that marijuana could only be obtained 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.

Senate leaders and House members opposed to the ruling about the tax issue said Wednesday’s decision made no sense because all sorts of bills that alter taxes or raise revenue to start in the Senate. They pointed out bills from increasing fines for passing a school bus to charging people extra to get specialty license tags, among other examples.

House Minority Leader Todd Rutherford said if Pope sticks to his ruling, it would destroy decades of work between the Senate and House.

“The bill is dead. And it is dead because the House with Speaker Pro Tem Pope decided to take complete control of the General Assembly,” the Democratic leader said.

The House and Senate are ending this session with a strained relationship. The House is attaching its election proposal to a number of Senate bills to force senators to act. The Senate’s budget appears to have less negotiating room than usual as senators are pushing $1 billion in tax rebates the House does not support.

Davis said opponents couldn’t beat the bill on a regular vote so they tried a last-ditch maneuver that worked. But he said he plans to keep fighting no matter what because he can’t stop now.

“There’s frustration. Seven years’ worth of work. Seven years’ worth of public testimony. Seven years worth of doctors and caregivers and moms and people coming and testifying and talking how this could make a material difference in their lives,” Davis said.