A man armed with a knife stabbed a New York policeman in the neck on Wednesday and two officers who ran to his rescue were wounded before they shot the attacker multiple times, police said.
All four were taken to Kings County Hospital where the police were in stable condition and the suspect was in critical condition, police said.
The attack in Brooklyn came amid mass protests and some rioting in New York over the death in Minneapolis of George Floyd, an unarmed black man, while in the custody of white police officers.
It was not immediately clear if the attack was related to the protests, but Police Commissioner Dermot Shea said the police were on duty to stop looting.
A man walked "casually" up to one of the officers near Church and Flatbush avenues in Brooklyn, pulled out a knife and stabbed him in the left side of his neck, Shea said.
"It appears to be a completely cowardly, despicable, senseless attack on a defenseless police officer," Shea said. "Thank God we're not planning a funeral."
The two other officers heard shots fired from two blocks away and ran over and saw that the suspect had the wounded police officer's gun, he said.
The two officers were shot in their hands in the struggle. Shea did not give details on how they were shot.
Prosecutors brought new criminal charges against four Minneapolis police implicated in the death of George Floyd, pinned by his neck to the street during an arrest that sparked more than a week of nationwide protest and civil strife.
Police in Brooklyn charged into a crowd of about 1,000 protesters defying a curfew, albeit peacefully, near an outdoor plaza, and clubbed demonstrators and journalists as they scurried for cover in a downpour of heavy rain.
The confrontation in Brooklyn seemed to be the biggest exception to a calmer night, hours after the new charges in Minneapolis.