The NYPD has released surveillance footage of an attack in which a 20-year-old man stabbed a police officer in the neck and shot two NYPD cops while screaming "Allahu Akbar."

The footage of the violent attack that took place in Brooklyn on Wednesday, shows Dzenan Camovic walking into a group of NYPD cops and stabbing a knife into the neck of one of the officers.

Surveillance footage Dzenan Camovic
Surveillance footage shows moment Dzenan Camovic stabbed an NYPD officer and shot two other cops

After stabbing one of the police officers in the neck, Dzenan Camovic took the gun from the cop who he had stabbed and shot two police officers. The two NYPD officers received gunshot wounds on the hands.

During the violent and unprovoked attack, Camovic screamed "Allahu Akbar" three times while he stabbed and shot at the NYPD officers in Flatbush neighborhood.

Dzenan Camovic
Dzenan Camovic

A major violent attack was thwarted as a fourth police officer who quickly responded to the attack shot and critically injured Camovic. Police in now investigating a terror angle to the attack as the assault is similar to the lone-wolf attacks carried out by Al-Qaeda and ISIS supporters in Europe.

The police said Dzenan Camovic, whose family hails from Bosnia is intubated and his condition is critical. The condition of all three police officers is stable and recovering.

" Earlier this week, 1 of our officers was stabbed in the neck without warning while protecting NYers. This was not a chance encounter—it was a planned assassination attempt on an NYPD police officer. It's only by sheer luck that this didn't have a drastically different outcome," NYPD said in an official statement.

According to CBS New York Dzenan Camovic is being charged with the attempted murder of a police officer, robbery, assault of a police officer, criminal possession of a weapon, and reckless endangerment. FBI additionally also is looking into the matter to see if federal charges should be filed.

The police also have assessed the Twitter account of Camovic. Investigators have found that the 20-year-old, whose family lives in Sheepshead Bay, opened a Twitter account this month, and all the tweets that he liked were related to the George Floyd protests, looting in Soho and anti-police propaganda, police said.

The family of Dzenan Camovic told NYPost that Camovic is a practicing Muslim but "absolutely not a terrorist."