BROOKLYN, N.Y. - Federal law enforcement officials have joined the NYPD to investigate an attack on three officers in Brooklyn late Wednesday night as they were working to prevent looting in the neighborhood.

The NYPD says Dzenan Camovic, 20, was shot by police and remains in critical condition.

In a statement, FBI New York Assistant Director in Charge William F. Sweeney Jr. said his office is "fully engaged", adding they will "use every federal statute available to hold the perpetrator accountable."

Police say two officers from the 70th Precinct were assigned to an anti-looting post at the corner of Church Street and Flatbush Avenue in Flatbush when Camovic walked up and stabbed one of them in the neck around 11:50 p.m.

A short time later, a sergeant and another officer heard shots fired a few blocks away. When they got to the scene, they saw the same man holding a gun, which police believe belonged to an officer.

Two officers were shot during the incident.

It's not clear how Camovic got hold of the gun.

"We had a chaotic scene with a knife recovered as well. The perpetrator was struck multiple times. He is here in critical. We had two officers shot in the hand and third was stabbed in the neck," said Police Commissioner Dermot Shea.

"Thank God all of our officers will recover. A number of others came to their aid. Another example of how the NYPD protects all of us, protects all of our communities no matter what's happening," said Mayor Bill de Blasio.

During his press briefing Thursday morning, the mayor called the attack "absolutely unacceptable" adding it was "absolutely unprovoked."

The sergeant and the two officers were taken to Kings County Hospital with non-life threatening injuries.