Two police shootings happened overnight in Brooklyn and Manhattan, making for a total of three this week, and one of them is being investigated by the FBI.

In Flatbush on Wednesday night, two NYPD officers were shot in the hand and a third was stabbed in the neck during a confrontation with a suspect, who was shot "multiple times," according to NYPD Commissioner Dermot Shea. The incident left 22 shell casings at the scene, Shea said during an early morning news conference.

The man "casually" walked up to an officer who was assigned to an anti-looting post and stabbed him in the neck, citing a video that has not yet been released, Shea said.

"That officer was stabbed in the left side of his neck, thank God missing an artery, and is recovering here in stable condition at the hospital," Shea said. A uniformed sergeant and police officer nearby heard gunshots from that scene at Church and Flatbush Avenues, and when they arrived, officers saw the suspect with a gun in his hand and began shooting.

Two officers were shot in the hand. An NYPD spokesperson did not know if the shooting injuries were from friendly fire or the suspect.

"We believe that when they got there, they saw the perpetrator with a gun in his hand, which we believe belonged to one of the officers," Shea said. "We know that we had a chaotic scene with a knife recovered as well."

The suspect is in critical condition. The three officers are in stable condition.

The FBI is investigating the incident.

"Last night's cowardly attack on the NYPD left one officer stabbed and two shot," FBI New York Assistant Director in Charge William F. Sweeney Jr. said in a statement. "The FBI New York Office is fully engaged. We respond as if one of our own was attacked, and we will use every federal statue available to hold the perpetrator accountable." The FBI did not immediately return a call for additional questions on why the feds are involved.

Hours later in the East Village, police shot a 55-year-old knife-wielding suspect inside of a deli at Third Avenue and East 10th Street about 6:40 a.m. Thursday, according to a preliminary statement from the NYPD.

Two officers were "followed inside by a 55-year-old male, who was holding a knife in his right hand," the statement said. The man "menaced" the officers were the knife, and one officer tased him, but it did not stop the man, the police account says.

The suspect allegedly began fighting with the deli employee, and then as he left the deli, he allegedly shoved the second female officer while the two officers were also leaving. Outside the deli, the man "continued to motion towards his waistband" and wouldn't stop his "aggressive advances," police say.

An officer and a second one who was responding to the scene shot the man in the arm and torso. He's in stable condition at Bellevue Hospital, a department spokesperson said.

Four officers were evaluated at an area hospital, the statement said. The spokesperson didn't know what they were evaluated for.

Police say they recovered this knife:

The knife recovered in the East Village.

The Flatbush and East Village shootings were the second and third times NYPD officers shot someone this week. On Tuesday night, police responded to a shooting in Crown Heights and fatally shot a man who was allegedly brandishing a gun.

That shooting was unrelated to the nationwide protests against racist policing that have motivated thousands to flood the streets across the city for a week speaking out against police violence. The city is under an 8 p.m. curfew as a result of looting and property damage that has followed some of the demonstrations, which police have been enforcing with a heavy hand as videos show cops beating down protesters or ripping them from their bikes.