Nastasic/iStock(NEW YORK) -- The New York state legislature voted overnight to decriminalize possession of small amounts of marijuana and expunge the records of low-level pot offenders across the state. The bill now goes to the desk of Gov. Andrew Cuomo, who is expected to sign it into law.

The senate voted on the measure Thursday night and the assembly approved the legislation just before 6 a.m.

The legislation treats possession of up to 2 ounces of marijuana as a violation instead of a crime. Possession of marijuana in the second degree will now be punishable by a fine of no more than $50.

The measure is the so-called "Plan B" after the legislature failed to fully legalize marijuana earlier this week.

Cuomo has said the bill would make a difference for many stuck in the criminal justice system as a result of marijuana, with past arrests frequently used to deny employment or other rights.

“The drug laws that are currently on the books have devastated our communities by disproportionately targeting people of color, forcing them to live with a criminal record that makes it harder to get a job or find housing,” said Assembly Speaker Carl Heastie. “Decriminalizing marijuana, paired with expunging records for these low-level offenses, will help undo some of these decades long injustices, and allow for people to be productive and successful. This is not the final step, but it will lay the groundwork for full decriminalization and legalization in the future.”

Illinois is also looking to decriminalize marijuana -- a move that could clear the convictions of 770,000.

Copyright © 2019, ABC Radio. All rights reserved.