Recreational marijuana is now set to be legalized in New York state.

The state legislature finished passing the Marijuana Regulation and Taxation Act late Tuesday night. The bill will head next to Governor Andrew Cuomo to sign.

Lawmakers erupted in applause once the final votes were counted. Senate sponsor of the bill, Senator Liz Krueger, has been pushing for this bill for about seven years and said it has been an uphill battle. 

“It feels great,” Krueger said when the bill passed. “It morphed through endless changes, we added medical, we added hemp, CBD. Nobody even knew what CBD was seven years ago.”

This feeling of triumph was shared by Assembly Majority Leader and sponsor of the bill Crystal Peoples-Stokes. 

"The last time the state has done anything like this would be when we ended the prohibition on alcohol. That was 1933," Assemblywoman Peoples-Stokes said. 

She continued that this bill is about more than just legalizing marijuana, it is also about stopping the disproportionate impact marijuana criminalization has had on communities of color.

"The studies tell us that more people who are not of color use the product, but the people of color were the ones who were arrested and incarcerated," Peoples-Stokes said. "The people who've paid the price for this war on drugs have lost so much and for everything they lost we ended up as a government trying to fill that hole. I think it's time for us now to fill that hole in a manner that allows them not only to allow them to pick themselves up by their boot straps, but to be able to have boots."

It will be a while though before New Yorkers can go out and purchase cannabis products. 

Senator Krueger said the earliest New Yorkers will be able to purchase recreational marijuana will most likely be in about 18 months.

The agreed-upon marijuana program is expansive.

It allows for New Yorkers to keep up to five pounds of marijuana in their home, grow up to three mature cannabis plants in their home, and opens the door for cannabis cafes and delivery services.

So think Grubhub, but for marijuana.

When asked if this bill goes too far, Stanley Fritz with Citizen Action said that this legislation is about removing the discrimination surrounding cannabis.

“If you don’t need five pounds in your house, I don’t need five pounds in my house, then don’t do it,” Fritz said. “But it allows for you to do it if you would like to. I go to BJ's and I pick up five pounds worth of peanuts because when I get hungry and get the munchies, I want to eat peanuts and I don’t want to run out. So people can do that. People also have wine cellars.”

The bill does look to address concerns about traffic safety. The state Health Department will be launching a study, researching different technologies that could detect if someone is driving under the influence.

“We put in provisions to do field testing with the state police and the Department of Health on emerging technologies for a saliva test in the field, so when it is proven that it works, much like a breathalyzer, that will become the test for New York state,” Senator Pete Harkham explained.

This still was not quite enough for three Democratic state senators. Senator Anna Kaplan was one of the Democratic senators that voted against the bill over concerns that there is still a lack of technology to detect impaired driving.

"I have long-held concerns and have spent the last few weeks speaking with constituents," Kaplan said. "Long Island already leads the state in traffic fatalities.”

The state does look to provide social equity within the bill.

The bill sets a goal of having 50 percent of marijuana business licenses issued to “individuals from communities disproportionately impacted by the enforcement of cannabis prohibition,” minority- and women-owned businesses, service-disabled veterans, and financially distressed farmers."

Law enforcement would no longer be able to use the smell of cannabis to justify searches. And New Yorkers with convictions for marijuana offenses that became legal under the new legislation would have their records automatically and immediately expunged.

“For decades, marijuana has been used as ammunition against Black folks and brown communities in this War on Drugs,” Assemblyman Khaleel Anderson said. “Racial profiling, stop-and-frisk, all under the guise of community safety, made our lives a living hell, and, of course, to this very day, we are constantly remedying the effects of accumulated years of PTSD on this War on Drugs. But today is a historic step in the right direction.”

The state will also be creating the Office of Cannabis Management, which will be in charge of setting up regulators and licensing distributors.

Cannabis products will be subject to a 9 percent state tax and a 4 percent local tax. The local tax would be split, with 1 percent going to counties and 3 percent going to cities, towns, and villages.

All cannabis taxes would be directed to the “New York State Cannabis Revenue Fund.” The revenue would cover the costs to administer and enforce the program.

After that, 40 percent of the remaining money would go to a community grants reinvestment fund, 40 percent to education, and 20 percent to drug treatment and public education programs.

Marc Molinaro, president of the State County Executives’ Association, said instead of leaving it up to the state to administer and distribute those funds, more funding should be directed straight to counties.

“Instead of creating a separate fund that the administration would administer by directing dollars back to counties, we just say, 'we don’t need to be a part of the fund,'” said Molinaro, executive for Dutchess County. “Just give us that recurring 3% and we’ll dedicate it, and you can require us to dedicate it to mental health, substance abuse disorder, impaired driving, and otherwise. That didn’t happen in this bill.”

Here's more on what is in the marijuana bill.