In a statement, Mayor Bill de Blasio said the violence against the police officers was unacceptable.

“And any other person who might use the right to peaceful protest as cover to initiate violence, cause mayhem or incite disorder — whether against the police, the people or property of our great city — should consider themselves on notice that New York City will not stand for it.”

Witnesses and accounts on social media described protesters being rounded up and put in police vans. There were also reports of objects being thrown at police officers and scuffles between officers and demonstrators.

The Stop Mass Incarceration Network organized the march, one of several across the country. About 400 people participated in the early part of the demonstration, which began at Union Square at 2 p.m. and wound down Broadway toward Police Department headquarters in Lower Manhattan.

Around 4:15 p.m., some of the protesters split off and went to the Brooklyn Bridge, where they broke through a police barricade. Some jumped over a fence and onto the westbound traffic lanes.