A New York City police detective shot and killed a robbery suspect who had struck the detective and his partner in the head with a police radio during an attempted arrest in the East Village in Manhattan on Saturday, officials said.

The man, who was 24 years old and not publicly identified, was taken to Mount Sinai Beth Israel hospital in serious condition and later pronounced dead, Police Department officials said. The man had been arrested several times previously, including for assault, officials said.

Both detectives had head injuries and were taken to Bellevue Hospital Center, said James P. O’Neill, the chief of department.

It was the second deadly police shooting in New York in three days, coming at a time of heightened tensions following several fatal encounters between officers and mostly unarmed black men across the country. On Wednesday, officers shot and killed a 30-year-old man after he fired at them. The officers had been pursuing the man, Jonathan Efraim, after receiving a call that he had opened fire in a crowded bar in Queens.