After months of resistance from the New York Police Department, the Brooklyn district attorney’s office announced on Tuesday that it would immediately carry out its plan to stop prosecuting most low-level marijuana cases.

The policy was proposed in a draft confidential memorandum in April, but was delayed as prosecutors and police officials tried to iron out their differences in meetings and phone calls.

The policy described in a memo dated Tuesday still offers plenty of exceptions: Only those with no criminal records, or minimal ones, qualify, and the cases of people caught smoking in public spaces — and especially around children — will not automatically be thrown out.

The district attorney, Kenneth P. Thompson, said in the memo that the policy was set up to keep nonviolent people, “and especially young people of color,” out of the criminal justice system; an open case, Mr. Thompson wrote, can lead to problems with jobs, housing and school for defendants.