A bill that decriminalizes marijuana and creates a system for expunging records was signed into law Monday by Governor Andrew Cuomo. The new law is set to take effect in 30 days.

The measure was approved at the end of June after a broader package that would have created a retail and commercial marijuana industry in the state faltered.

“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.”

The measure reduces the penalty for possession of marijuana under two ounces in addition to expunging convictions.

For lawmakers in support of the legislation, the measure is aimed at having the effect of reducing arrests and legal woes for people of color especially.

“Decriminalizing marijuana is an essential part of reforming our state’s broken justice system,” said Senate Majority Leader Andrea Stewart-Cousins. “For too long, communities of color have been disproportionately targeted and negatively impacted. The Senate Democratic Majority will continue our efforts for full legalization and regulation of marijuana, and today’s decriminalization is a good first step.”

Assembly Speaker Carl Heastie, a fellow Democrat, called the bill’s approval “an important step” in reversing years of tightened drug laws.

“Decriminalizing marijuana and expunging records for those with low level offenses will go a long way towards helping our communities, and especially people of color, who have been devastated by them,” Heastie said. “By removing the barriers and stigma that come with these records, we clear the path for many New Yorkers to find a job, housing and go on to live successful and productive lives.”