NEW YORK (AP) — A 19-year-old New York City man accused of plotting a knife attack on behalf of the Islamic State group told undercover agents he wanted to record the bloodshed on video in hopes of inspiring others to commit attacks, federal prosecutors said Friday.

Awais Chudhary was arrested Thursday as he tried to pick up a tactical knife, mask and cellphone rigging that he had ordered online as his plot escalated quickly from the planning states to the verge of being carried out, prosecutors said.

The arrest “almost certainly saved lives,” Police Commissioner James O’Neill said.

ADVERTISEMENT

Chudhary, a naturalized U.S. citizen born in Pakistan and living in Queens, was arraigned Friday and order jailed without bail on federal charges of attempting to provide material support to the terrorist organization. He faces up to 20 years in prison if convicted.

A message seeking comment was left with a public defender appointed to represent Chudhary, who is due back in court Sept. 13.

The New York Police Department said Chudhary was planning a “lone wolf”-style attack on the Flushing Bay Promenade near the World’s Fair Marina and LaGuardia Airport.

Chudhary started texting undercover agents about the plot on Aug. 23 and the next day made a trip to scout the target location, surrounding areas and possible escape routes, federal prosecutors said. He ordered the other items Sunday and Monday, they said.

In the texts, Chudhary told an undercover agent he intended to use a knife “because that’s what he knows,” but would consider using a bomb if the agent could show him how to build one, federal prosecutors said.

He texted a another undercover agent a screenshot of a document titled “Islamic State” with subheadings that included “Places to Strike,” ″The Ideal Knife” and “Knives to Avoid,” with instructions that included a diagram of the human body and pointers on where to stab a victim, prosecutors said.