A vote in the Ohio state Senate Wednesday passed a bill that approves the use of medical marijuana, six months after voters in the Midwestern state overwhelmingly rejected recreational use of the substance. The bill is now headed to Gov. John Kasich, and if he approves it, Ohio will become the 25th U.S. state, and the first in the Midwest, to legalize the use of medical marijuana.

The bill was passed with an 18-15 bipartisan vote, with both Democrats and Republicans voting for and against it, in the Senate. The Ohio House also cleared the bill soon after with a 67-28 vote. The passage of the bill by both Houses of the Republican-led state legislature is being seen as a move to head off a proposed medical marijuana measure that campaigners are trying to put up for a ballot in November.

Ohioans for Medical Marijuana is continuing its efforts to get the required number of signatures from Ohio voters to put its proposals to vote. Its measures differ from the bill passed by lawmakers by proposing that medical marijuana users be allowed to home grow and including more medical conditions that would qualify for marijuana use.

Under the proposals of the bill, the state would regulate cultivation and distribution of marijuana, and a registered pharmacist would have to be hired by all dispensaries selling it. Doctors who can recommend its use would also be overseen by the state. The dispensaries themselves would have to be more than 1,000 feet from daycare facilities and communities would be able to vote to not have one. Employers would also have the choice to maintain drug-free environments.

Kasich’s office said he would review the bill. He has said in the past that he would support such a bill if doctors supported it.

Sen. Bill Seitz, a Cincinnati Republican who supported the bill, pointed to a provision that asks the federal government to remove marijuana from its list of Schedule I dangerous substances.

“Nobody with a straight face could actually claim that marijuana is more harmful than cocaine, yet marijuana is on Schedule I and cocaine is on Schedule II. Now if that isn't nuts, I don't know what is,” he said.