NEW YORK — Faced with fresh evidence of the racial disparity in marijuana enforcement across New York City, Manhattan's district attorney said Tuesday he will largely stop prosecuting people for possessing or smoking marijuana.

The move by District Attorney Cyrus Vance Jr. came the same day that Mayor Bill de Blasio promised that the city's police department would overhaul its marijuana enforcement policies in the next 30 days. Brooklyn's district attorney also said he would scale back prosecutions.

"We must and we will end unnecessary arrests and end disparity in enforcement," de Blasio said at a conference of the Center for American Progress in Washington, D.C.

Vance said that his office will stop prosecuting marijuana possession and smoking cases starting Aug. 1 except for a few cases involving "demonstrated public safety concerns."

The change, he said, would reduce marijuana prosecutions in the borough from roughly 5,000 per year to about 200.

"The dual mission of the Manhattan D.A.'s office is a safer New York and a more equal justice system," he said in a statement. "The ongoing arrest and criminal prosecution of predominantly black and brown New Yorkers for smoking marijuana serves neither of these goals."

Brooklyn District Attorney Eric Gonzalez said his office would work with the police and the mayor's office to pinpoint the "the very small number" of marijuana-possession cases that should be prosecuted because of public safety concerns.

The issue of marijuana arrests was highlighted by a New York Times report on the persistent racial gap in marijuana arrests.

The Times reported that blacks in the city are eight times more likely to be arrested on low-level marijuana charges as whites and that the difference cannot entirely be attributed to more residents in predominantly black neighborhoods calling police to complain about marijuana.

Federal statistics show similar rates of marijuana use among whites, blacks and Hispanics, but about 87 percent of people arrested for pot in New York City are black or Hispanic.

Marijuana arrests have declined overall since de Blasio, a Democrat, took office in 2014.

De Blasio announced in November 2014 that the police would start giving many people court summonses for marijuana instead of arresting them.

But the mayor said this week that more needs to be done to reduce marijuana arrests and target the racial disparity in enforcement.

"We have got to continue to drive down the arrests," he said Monday on TV station NY1. "We've got to look at other policy changes that will help us do that. I don't accept disparity. I really don't."

De Blasio did not provide any details of what the policy changes might entail.

Marijuana is illegal in New York state except for medical use on a strictly regulated basis, but Gov. Andrew Cuomo signaled last month that the time might be right to consider loosening statewide restrictions.

"The facts have changed," Cuomo said. "You have states that have legalized it now. It is no longer a question of legal or illegal."

Cuomo spoke after his Democratic primary opponent, actress Cynthia Nixon, called for the legalization of marijuana as a matter of racial justice. "We have to stop putting people of color in jail for something that white people do with impunity," Nixon said in a campaign video.