A teenager in New York has been arrested and accused of plotting an ISIS-inspired attack.

Awais Chudhary, a 19-year-old Queens man, allegedly told undercover agents that he wanted to carry out a knife or bomb attack in the terror group's name, according to court filing sent to The Hill by the U.S. Attorney's Office.

Chudhary was arrested after allegedly going to pick up a knife he ordered through an online retailer.

"During communications with undercover law enforcement officers, Chudhary has confirmed that he has pledged allegiance to ISIS's leader and stated that he wants to conduct a knife or bomb attack in Queens, New York," the complaint said.

He also allegedly asked an undercover agent for a video that demonstrated using a knife in an attack so he could "use it effectively."

NBC New York reported that Chudhary was expected to face terror-related charges in a Friday court appearance. The U.S. Attorney's Office for the Eastern District of New York confirmed the arrest in a statement to NBC, saying there was no "public safety issue as a result of the arrest."

-Updated at 4:30 p.m.