The NYPD has released a video of what they're describing as a "planned assassination attempt" Wednesday on one of their officers who was on anti-looting patrol in Brooklyn.

"Earlier this week, 1 of our officers was stabbed in the neck without warning while protecting NYers," the NYPD tweeted on Saturday. "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."

2 NYPD COPS SHOT, ANOTHER STABBED DURING 'UNPROVOKED' ATTACK

The startling video shows the suspect, 20-year-old Dzenan Camovic, turning the corner near a shoe store before lunging towards the Officer Yayonfrant Jean Pierre's neck. During the struggle, the suspect was shot and two other officers sustained gunshot injures to their hands.

There are reports of the suspect having shouted "Allahu akbar" before stabbing the officer, though the video has no audio. NYPD has said they are looking into this incident and the attacker as possibly having terror links. They also are investigating whether the stabbing was inspired by anti-police sentiments expressed during the protests.

It was one of the most serious incidents in a city that's already-reeling from riots surrounding George Floyd's death. Along with peaceful demonstrations, there have been smash-and-grab sprees and a string of assaults on police officers.

THOUSANDS OF PROTESTERS GATHER IN DC FOR LARGEST GEORGE FLOYD DEMONSTRATION YET

NYPD Commissioner Dermot Shea called for calm Thursday at a news conference that opened with a broadside against elected officials and others whom he blamed for stirring up animosity by speaking against police and sharing videos on social media that, presented without context, are seen as evidence of officer misconduct.

“How do we move forward?” Shea said. “I do not know how we will get there. I wish I had all the answers, but I know this much. We cannot reach that place until we end the hateful speech and the lawbreaking and the unprovoked attacks against police officers and the rhetoric that fuels it.”

Shea said it was too early in the investigation to say what motivated Wednesday night’s attack, but police union head Patrick Lynch said he saw a connection to the protests.

“Did we doubt? Because of the rhetoric we’re hearing, the anti-police rhetoric that’s storming our streets, are we surprised?” said Lynch, president of the Police Benevolent Association. “I’m not. We said it’s going to happen.”

Fox News' Tara Prindiville and The Associated Press contributed to this report.