Police gather at the scene where officers were shot in the June 3, 2020, attack in New York City.
CNN  — 

A man who attacked New York Police Department officers in a Jihadist-inspired attack in 2020 was sentenced 30 years in prison Wednesday, according to a news release from the US Attorney’s Office for the Eastern District of New York.

Dzenan Camovic, a Bosnian national who was living in Brooklyn illegally, was inspired by terrorism, prosecutors said, adding he will be deported after completing his sentence.

Camovic pleaded guilty in March to charges related to the attack, the US Attorney’s Office previously announced.

“Today’s 30-year sentence, along with Camovic’s removal from the United States, guarantees the community will be protected from his hate-filled ideology and actions,” Breon Peace, the US Attorney for the Eastern District of New York, said in a statement.

Prosecutors said Camovic approached two uniformed NYPD officers on the night of June 3, 2020, 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,” the indictment says.

Camovic then returned to the first officer, attacked him again and robbed him of his gun, according to the indictment. He then used that weapon to fire multiple shots at several officers, prosecutors said.

Police returned fire, and Camovic was struck multiple times, CNN previously reported.

Several officers were injured, including one officer who was stabbed in the neck and two others who were shot in the hand, according to the release from the US Attorney’s Office.

The government has said in a detention memo that Camovic repeatedly screamed “Allahu Akbar” during the attack on the officers, according to previous CNN reporting.

The government also said its investigation showed that prior to the June 2020 attack, “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).

“As today’s sentence demonstrates, those who direct hate-fueled violence at anyone - including the brave men and women of law enforcement - will face stiff consequences in our criminal justice system,” Michael J. Driscoll, the assistant director in charge of the FBI New York field office, said in a statement.