NYPD officers near the Brooklyn site where Dzenan Camovic shot two officers on June 4, 2020.
CNN  — 

A federal grand jury returned a four-count indictment Wednesday against 21-year-old Dzenan Camovic for a knife attack on NYPD officers during a protest on June 3 in Brooklyn, an attack that prosecutors describe as ISIS inspired.

Prosecutors allege Camovic, a Bosnian national, was living in Brooklyn illegally when he approached two uniformed NYPD officers on the night of June 3 and stabbed one of them in the neck with a knife. According to the indictment, Camovic then chased the second officer, “repeatedly and violently stabbing at the officer with the knife and eventually throwing the knife at the officer.”

Camovic then allegedly returned to the first officer, stabbing him again and robbing him of his gun, according to the indictment. Prosecutors say Camovic used the officer’s 9mm caliber weapon to fire multiple shots at several officers.

Police returned fire, and Camovic was struck multiple times.

All three officers who were injured in the incident are out of the hospital but not back at work, the New York Police Department told CNN Wednesday.

Prosecutors allege that Camovic’s actions were inspired by his support for ISIS.

In a detention memo, the government alleges Camovic repeatedly screamed “Allahu Akbar” during the attack on the officers. The government further says its investigation shows that, prior to the attack on June, “Camovic possessed a significant volume of materials that demonstrate his interest in and support for violent Islamist extremism,” including the designated foreign terrorist organization the Islamic State of Iraq and al-Sham (ISIS).

Camovic’s attorneys, Robert G. Stahl and Laura K. Gasiorowski, told CNN in a statement that their client suffered from mental health issues, and was not motivated by religious extremism.

“Despite the Government’s allegations otherwise, Dzenan Camovic was not motivated by extremism and this has nothing to do with religion,” they said. “This is Dzenan’s first arrest, and he comes from a hard-working, loving family. Like a number of others during this pandemic he has been struggling with untreated mental health issues. We look forward to defending him.”

FBI Director Christopher Wray said in a news release Wednesday that the NYPD officers were “heinously ambushed in the line of duty.”

“As fellow Americans were exercising their rights to demonstrate, these brave law enforcement officers were brutally attacked to further a violent agenda associated with ISIS and al-Qaeda in the Arabian Peninsula,” Wray said.

Camovic was indicted in federal court for Hobbs Act robbery, using and discharging a firearm during that robbery, theft of a firearm that moved in interstate commerce and unlawful possession of a firearm as an illegal alien.

Additionally, Camovic was indicted on state charges of attempted aggravated murdered, first-degree attempted murder, second-degree criminal possession of a weapon and other related charges.

“This defendant allegedly engaged in an unprovoked and cowardly attack on an officer and his partner, then opened fire at responding officers,” Brooklyn District Attorney Eric Gonzalez said in a statement. “We are lucky that these officers were not killed. This case underscores the dangers our police officers face day in and day out. We will now seek to bring this defendant to justice for endangering their lives and the lives of those around them.”

Camovic will be arraigned at a later date, and if convicted, Camovic faces a maximum sentence of life in prison, according to prosecutors.

CNN’s Mirna Alsharif contributed to this report