A Bronx man, Samjir Alimehmeti, was arrested Tuesday for trying to fly overseas to join ISIS. View Full Caption US Attorney's Office

THE BRONX — A Bronx man who used Islamic State decapitation videos to motivate himself while working out was arrested Tuesday for trying to join the terrorist organization and lying on his United States passport application, federal prosecutors said.

Sajmir Alimehmeti, a 22-year-old who who also went by the name Abdul Qawii, was caught Tuesday in an undercover operation by the FBI and NYPD that began last year, according to Manhattan U.S. Attorney Preet Bharara.

"Alimehmeti is charged today with actions that show a clear intention to support a terrorist organization that is hell-bent on murder an mayhem," Bharara said.

He was held without bail after being arraigned in Manhattan Federal Court Tuesday afternoon.

Alimehmeti tried to enter the United Kingdom through Manchester Airport on Nov. 24, 2014, but was rebuffed when authorities found camouflage pants and shirts and a pair of nunchucks in his luggage, officials said.

He tried again on Dec. 18, 2014, this time through Heathrow, but authorities again denied his entry when they found images of Islamic State flags and improvised explosive device attacks on his laptop and cellphone, prosecutors said.

The data, which U.K. authorities handed over to American investigators, also had images of Islamic State fighters and himself pointing an index finger upward in a sign of allegiance to the terrorist organization, prosecutors said.

He also had recordings of lectures by al- Qaeda leader Anwar al-Awlaki, including titles like "Hellfire and its Life," "Advice to the Ones Who Stay Behind," and "The Punishment of Those Who Don't Participate in Jihad," prosecutors said.

(Manhattan U.S. Attorney's Office)

After being blocked from the U.K., Alimehmeti applied for a new passport on Oct. 23, 2015, and wrote in his application that he lost his old one on a train, prosecutors said.

"The subject in this case was allegedly having a hard time getting overseas to fight with ISIL. But when he couldn't leave, he allegedly seemed more than willing to help others tread the same path to join an insidious and deadly terrorist organization," said FBI Assistant Director-in-Charge Diego Rodriguez.

In the fall of 2015, undercover agents reached out to Alimehmeti, prosecutors said. During their conversation on Nov. 23, 2015, Alimehmeti said he lied about his passport to get a new one so entry officials in the future don't see the U.K. entry denials, officials said.

On May 9, Alimehmeti also told undercover agents that he liked to watch videos from the Islamic State showing militants decapitating prisoners, prosecutors said. The videos motivated him while he exercised, he said.

Five days later, Alimehmeti met with undercover agents who said they were heading to the Middle East to train with ISIS, prosecutors said. Alimehmeti told them which pair of boots, cellphone, military surplus gear was best to buy and which encryption apps were best to use, prosecutors said.

"I'm ready to f---ing go with you, man... You know I would... I'm done with this place. There are [non-believers] everywhere," he told the undercovers.

Alimehmeti also bought military-style gear from a "major online retailer," including two Cold Steel Tanto spike knives, an Ontario 499 Air Force survival knife, a credit-card sized folding knife and a 24-inch pocket chain saw, a face mask, handcuffs and steel-knuckled gloves, officials said.