(Reuters) - Thousands of San Francisco residents convicted of marijuana offenses since 1975 will see those convictions dismissed or reduced under an effort announced on Wednesday by the city’s district attorney.

California’s Proposition 64, which legalized recreational pot use and possession and reduced criminal penalties, allowed people to ask a court to reduce or dismiss past marijuana convictions.

But top San Francisco prosecutor George Gascon said on Wednesday he would not wait and would instead dismiss 3,038 misdemeanors and consider reducing an additional 4,900 felony marijuana charges.

The move is meant to make it easier for people who would otherwise have to retain an attorney to file expungement paperwork for convictions that can scuttle employment and housing opportunities and have disproportionately affected African-Americans, he said.

“Long ago we lost our ability to distinguish the dangerous from the nuisance, and it has broken our pocket books, the fabric of our communities, and we are no safer for it,” Gascon said in a statement.

Gascon said relatively few Californians had petitioned courts to have convictions expunged since the legalization measure was passed in late 2016.

California Lieutenant Governor and Democratic gubernatorial candidate Gavin Newsom tweeted his support on Wednesday.

“This example underscores the true promise of legalization – providing new hope for those whose lives were derailed by a costly, broken and racially discriminatory system,” he said.

Nine states plus the District of Columbia have legalized the drug for recreational use, while dozens of others permit its medicinal use. California finalized its licensing, regulatory and tax structure to allow cannabis shops to open for retail sales this year.

Earlier this month, however, the U.S. Justice Department rescinded an Obama administration policy that had eased enforcement of federal marijuana laws in states that legalized the drug, instead giving federal prosecutors wide latitude to pursue criminal charges.

“While drug policy on the federal level is going backwards, San Francisco is once again taking the lead to undo the damage that this country’s disastrous, failed drug war has had on our nation and on communities of color in particular,” Gascon said on Wednesday.