A marijuana plant is seen in a greenhouse in Mendocino County, Calif. (Josh Edelson/AFP/Getty Images)

District Attorney George Gascón said Wednesday that San Francisco will immediately dismiss all marijuana misdemeanor convictions dating to 1975 and will wipe arrest records clean for anyone who faced such charges. The city also plans to review all marijuana felonies recorded during the same time period and, in appropriate cases, resentence them to misdemeanor offenses.

“We want to address the wrongs that were caused by the failures of the war on drugs for many years in this country and begin to fix some of the harm that was done not only to the entire nation but specifically to communities of color,” Gascón said at a news conference Wednesday.

The decision stems from a lesser-known provision in California law that legalized recreational marijuana, language that offers a second chance to people convicted of marijuana crimes in the state. The new law allows people with misdemeanor marijuana records to have them expunged and those with felony convictions the opportunity to have them reduced, pending a review.

But it does not happen automatically: A person convicted of a marijuana crime must petition a court to have his or her record changed. At least 4,500 people have petitioned to have their convictions changed since the provision went into effect in November 2016, upon passage. But lawyers and others say that the change has not been well publicized and that the requirement to petition a court makes it difficult for low-income people to have their records changed.

That, Gascón and others in San Francisco said, is part of the reason he is automatically changing or reviewing convictions.

“There are thousands of cases that are going to be dismissed at no cost,” said San Francisco supervisor Malia Cohen.

Gascón estimates that just more than 3,000 misdemeanors will be automatically dismissed. Nearly 5,000 felonies will be reviewed and, if appropriate, resentenced to misdemeanors. Prosecutors can decide not to support a reduction should the person have a major felony, such as murder, on their record. Old convictions will be reclassified under the law as it reads now. For example, if someone had been convicted of possessing an ounce or less of marijuana, that conviction would be tossed out because that is now legal under California law.

The Drug Policy Alliance said there have been 500,000 arrests for marijuana offenses in California in the past 10 years, and it estimates up to a million people have reviewable convictions on their records.