NEW YORK (CBSNewYork) — The NYPD said an officer was stabbed in the neck and two others were shot late Wednesday night in Brooklyn.

All three are expected to survive. The suspect is in critical condition.

READ MORE: NYPD Investigating Citywide Bank Robbery Pattern; Man Accused Of Stealing More Than $4,000 From 5 Banks

The FBI released a statement, reading in part, “We respond as if one of our own was attacked, and we will use every federal statute available to hold the perpetrator accountable.”

NYPD Commissioner Dermot Shea said two officers were assigned to prevent looting at the corner of Church and Flatbush avenues in the Flatbush neighborhood.

Around 11:45 p.m., a 20-year-old man allegedly walked up to the officers, took out a knife, and stabbed one of them in the left side of the neck.

Police said the suspect then stole a gun from the officers.

Two other officers responded after hearing gunshots and were both shot in their hands, police said.

“We know that we had a chaotic scene, with a knife recovered, as well. In the ensuing, we had the perpetrator struck multiple times. He is here and he is in critical condition,” Shea said outside Kings County Hospital. “We had two police officers shot in the hand, and we have a third police officer that is stabbed in the neck. All police officers, at this point in time, thank God, are in stable condition and are expected to recover.”

The commissioner said 22 shell casing were recovered, and investigators are reviewing the officers’ body cameras.

READ MORE: SPECIAL COVERAGE: 'AIDS Walk New York: Live At Home' On CBSN New York

The wounded officers were rushed to Kings County Hospital, where several cops lined up outside in solidarity.

“We had a horrible, painful incident late last night in Brooklyn. Three of our officers wounded in an absolutely unprovoked attack,” Mayor Bill de Blasio said Thursday. “We are still piecing together the details… and there’s still a lot more to know, but I’ve seen the video myself and I can say there were two of our officers simply trying to protect our community, and they came under unprovoked attack.

“That is absolutely unacceptable,” he added. “An attack on any one of our officers is an attack on all of us.”

The mayor said the stabbed officer came from Haiti and was “giving back to the country that welcomed him and embraced him.” He said the other two officers’ parents emigrated here, as well.

“The officers who were wounded represented all that is great about New York City, represented the fact that people come here from all over this country, all over this world to find a better life,” de Blasio said.

Sources told CBS2’s Lisa Rozner the suspect lives locally, has no criminal record, and no ties to Antifa or white supremacist groups. Detectives are checking his social media, his overseas travel, since he is an Eastern European native, and whether he’s associated to anyone with a terror link.

“It is unnecessary violence. My stepdaughter is a police officer. I fear for her safety,” Flatbush resident Carl Schwendenmann said.

“I just feel it’s very sad that this is happening in our neighborhood,” resident Lynda Williams added.

It was the second police-involved shooting in 24 hours in Brooklyn. Late Tuesday night, officers shot and killed an armed shooting suspect in Crown Heights.

Then on Thursday morning, police shot another man accused of menacing officers with a knife in the East Village.

MORE NEWS: NYPD Releases Video Of Vandalism Suspect After Crucifix Toppled, Flag Burned At Brooklyn Church

The incidents come amid several days of peaceful demonstrations against police brutality that sometimes turned violent in the overnight hours.