About 40 people were arrested in Manhattan Thursday evening while protesting two fatal police-involved shootings, police said.

The protest, which drew nearly 500 people, came on the heels of the deaths of Alton Sterling and Philando Castile, two black men who were killed in police-related incidents fewer than 24 hours apart earlier this week. 

Protesters gathered in Union Square and then marched throughout the city, the echo of beating drums alternating between chants of "Hands up, don't shoot!" and "I can't breathe!"

Sgt. Carlos Nieves tweeted just before 8:15 p.m. that "there are numerous arrest being made for disorderly conduct at 42 st & 7 Ave."

He also tweeted video of protesters standing in the street and obstructing traffic at the intersection of West 42nd Street and Broadway. The crowd chanted, and some held signs, with phrases like "White silence kills."

Many protesters remained in Union Square, gathering in a circle as community members took turns giving impassioned remarks. 

advertisement | advertise on newsday

"Who's speaking for us?" Sasha Owens, a resident of Harlem, shouted to the crowd. "Nobody."

Austin James, 25, said that working at a largely minority charter school in Harlem has shown him how incidents of police brutality affect everyone in the community, including children and family members.

"I feel I have an obligation to demonstrate and protest for the safety and success of my students," James said. 

James added that, as a black man, he feels less safe. 

"It's not just police," he said. "It's the message that anyone has the right to attack a black person in America – and not just to attack, but to murder." 

Sterling, 37, was shot and killed in Baton Rouge, Louisiana, after a confrontation with police officers on Tuesday. A video shot by a bystander has been widely circulated in the aftermath.

Castile, 32, was killed by a police officer during a traffic stop in Minnesota on Wednesday. 

Both deaths are under investigation.

Throughout the protest, Setareh Shohadaei, 30, held up an "I Can't Breathe" sign with Eric Garner's name and age at the time of his death on July 17, 2014, when an NYPD officer put him in a chokehold. 

"These are all open wounds. None of them have healed," said Shohadaei, a PhD student studying political philosophy at The New School. "This should be a reminder that there is a history of this kind of violence." 

advertisement | advertise on newsday

DeJohn Jones, a member of the Stop Mass Incarceration Network, a nonprofit co-founded by Cornel West, said that when the video of Alton Sterling's death went viral, she refused to watch it. 

"I can't do this [activism] work and then watch what [the police] are doing at the same time. I don't think I would be out here," said Jones, who was wearing a "Stop Police Terror" T-shirt.