Legislation decriminalizing small-time pot possession was signed into law by New York Gov. Andrew Cuomo on Monday, and will become law in 30 days.

It reduces criminal possession of marijuana to a violation and cuts fines to $200 for possessing below 2 ounces of weed and caps fines at $50 for having under an ounce.

The bill paves the way for retroactive expungement of convictions for most devil’s lettuce-related misdemeanors.

“Communities of color have been disproportionately impacted by laws governing marijuana for far too long, and today we are ending this injustice once and for all,” Cuomo said.

“By providing individuals who have suffered the consequences of an unfair marijuana conviction with a path to have their records expunged and by reducing draconian penalties, we are taking a critical step forward in addressing a broken and discriminatory criminal justice process.”

Several district attorneys in the city and other parts of the state already stopped prosecuting possession of small amounts of marijuana months before the legislation passed.

But it’s still half a loaf for Albany lawmakers who attempted an eleventh-hour push for the full legalization of recreational marijuana.

Intense three-way negotiations among Cuomo and the leaders of the state Assembly and Senate broke down in the last week of the legislative session — which ended June 21 — and ultimately the bill failed.

Hesitant lawmakers representing rural and suburban areas would not sign on, with some citing concerns like driving under the influence.

Other issues including taxation and regulation of the substance also remained unresolved.

Stiff opposition from the law enforcement community, parent-teacher associations and doctors’ groups also helped sink the bill.