The New York Police Department will spare many people who smoke marijuana in public from getting arrested and will give them a ticket instead, but not if a person has certain kinds of past arrests or convictions, Mayor Bill de Blasio said on Tuesday.

The changes, which are set to take effect on Sept. 1, will move New York City another step closer to eliminating a vast category of arrests that no longer exists in some states. But for New Yorkers on probation or parole or who have open arrest warrants, getting stopped for smoking marijuana will continue to mean being handcuffed and taken to a police station house for fingerprinting.

The plans were announced in East Harlem by Mr. de Blasio and the police commissioner, James P. O’Neill, who in May convened a 30-day working group to review the issue. Around 17,500 people are arrested each year on marijuana possession charges, but Mr. de Blasio said about 10,000 of those arrests would be eliminated under the new policy.