The New York State Senate is expected to pass legislation Friday that legalizes medical marijuana in New York under a deal brokered between Gov. Andrew Cuomo and lawmakers.

The senate was scheduled to vote on the measure around 10 a.m. ET after it passed the New York State Assembly earlier this morning. As part of the deal, medical marijuana would be accessed through dispensaries, and patients prescribed the drug won’t be able to smoke it. They can either ingest the medical marijuana or take it in pill form or through oils, according to the New York Daily News.

"Medical marijuana has the potential to do a lot of good for a lot of people who are in pain and who are suffering," Cuomo told a press conference Thursday afternoon, according to the Albany Times-Union. “There are also risks that have to be averted -- public health risks, public safety risks. And we believe that this bill strikes the right balance."

There are other provisions in the deal, including that medical marijuana won’t be dispensed until the end of 2015 at the earliest, and that patients will have to sign up for a medical marijuana registration card through the state Department of Health.

Once the bill is signed by Cuomo, New York will become the 23rd state to legalize medical marijuana. Colorado and Washington are the only states that have legalized recreational marijuana, while Oregon may be the third state to do so.