This problem dates back to the 1970s, when affluent parents grew angry seeing the futures of their college-educated children ruined as a result of arrests for tiny amounts of marijuana. The New York Legislature responded to this anger by forbidding police officers from arresting people for small amounts of marijuana unless the drug was being smoked or displayed in public.

There were fewer than 1,000 such arrests in 1990. But eventually police officers began to illegally charge people with public display of marijuana after forcing them to remove the drug from their backpacks or pockets. In 2011, an astonishing 50,000 people were arrested on charges of public possession. The number began to plummet under Mayor Michael Bloomberg after the city instructed police officers to obey the state law.

There were just over 26,000 arrests in 2014 — the year Mr. de Blasio took office and introduced a policy under which people with tiny amounts of the drug were typically issued the equivalent of a traffic summons instead of being dragged through the legal system. Last year, there were about 16,600 such arrests.

But the racial disparity in arrests persists. A new analysis of state data by the Police Reform Organizing Project found that about 85 percent of those arrested over trivial amounts of marijuana in the first nine months of this year were black or Latino. It also shows that marijuana arrests edged up by about 12 percent in the first nine months of this year, as compared with the same period in 2015.

The Police Department attributes this racial disparity to the fact that black and Latino people tend to live in higher crime neighborhoods that are more heavily policed. But criminal defenders and police reform advocates have a different interpretation. They argue that, despite department policy, officers are still wrongly charging people with public possession, and that police officers turn a blind eye to marijuana use in affluent white areas while bearing down on it in minority communities.