The NYPD says at least two officers were attacked in Tuesday’s anti-cop demonstrations that saw hundreds of protesters clog Manhattan streets, march over the Brooklyn Bridge, and stage a die-in at the Barclay’s Center -- and the mayor is decrying the violence.

NBC New York reports that an off-duty sergeant on the Brooklyn Bridge was punched and that a second cop was hit by a bottle.

In all, 42 people were arrested, officials said Wednesday, and all of the charges were misdemeanors. There have been charges related to the police assaults.

New York City Mayor Bill de Blasio, who police unions have complained does not have their back, condemned the alleged attacks Tuesday night.

The protests were part of at least two dozen other actions across America after fresh cases of police violence against unarmed black men.

In a statement, de Blasio said:

"Violence or threats of violence against the police are unacceptable and will absolutely not be tolerated. These attacks will be thoroughly investigated, and we will urge the full prosecution of the perpetrators."

He continued: “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. Anyone who decides foolishly to engage in such destructive acts can expect a swift arrest and aggressive prosecution. As I have said before, such activity is beneath the dignity of New York City.”

The protesters chanted “No Justice, No Peace!” and held up signs that said, "Stop murder by police" and "Stop killer cops.”

The demonstrations in New York and elsewhere were organized by the Stop Mass Incarceration Network and the National Actions to Stop Murder by Police following the April 4 fatal shooting of Walter Scott, an unarmed black man shot in the back by a white police officer in North Charleston, South Carolina.

The killing -- just one of a succession of fatal police shootings -- was captured on video, and the officer has been charged with murder.

RELATED: Protests held across America against police shootings.

Police in Los Angeles said they arrested 15 protesters from a group of nearly 100 after they stopped on Metro Rail tracks and ignored orders to disperse.

Elsewhere on the West Coast, more than 100 protesters surrounded a police station in San Francisco and disrupted a meeting at City Hall. In nearby Oakland, demonstrators massed outside the Oakland Police Department and poured onto Interstate 880, television broadcasts showed.

Rush hour on the Bay Bridge linking San Francisco to Oakland was briefly delayed when several protesters tried to block traffic, police said. Six demonstrators were arrested.

In Wisconsin, about 100 protesters, mostly high school students, blocked a major roadway in Madison, where last month's fatal shooting of unarmed black teen Tony Robinson Jr. by a white police officer has triggered a series of demonstrations.

Protesters said they hoped their march would galvanize debate about the use of deadly force by police against minorities, with the families of several unarmed black or Hispanic men or boys who died in encounters with police demanding more oversight.

Last year, protests were sparked by a string of high-profile cases of black men losing their lives at the hands of white police officers.

But the outbursts of anger following the deaths of Michael Brown in Ferguson, Missouri, and Eric Garner in Staten Island,  New York slowed to a standstill over the winter.

Another group of protesters, led by Justice League NYC, has embarked on a 250-mile trek to Washington from New York City, and is due to reach the National Mall on April 21.

With Reuters

Follow John A. Oswald Twitter - @nyc_oz.