NEW YORK (CBSNewYork/AP) — A 22-year-old Bronx man is being held without bail Wednesday on charges he tried to provide assistance to the Islamic State.

Sajmir Alimehmeti was arraigned at federal court after being arrested Tuesday.

READ MORE: Walker Scores 19, Knicks Romp To End 15-Game Skid Vs 76ers

Assistant U.S. Attorney Brendan Quigley argued that the U.S. citizen was a flight risk and a danger to the community after assisting law enforcement undercover operatives who posed over the last half year as men eager to support the Islamic State.

Quigley said investigators found a passport Alimehmeti claimed he had lost wrapped in cash when he was arrested in an early morning raid at his apartment. An Islamic State flag, he said, was in the man’s apartment, too.

Assistant Federal Defender Sylvie Levine said her client was not unusual.

“In many ways, he’s just like any other 22-year-old, college-age student,” she told U.S. Magistrate Judge Gabriel W. Gorenstein in Manhattan.

She noted there was no conspiracy charge and said he had not conversed with anyone who was not a member of law enforcement.

“None of these statements appear to be followed by any action,” Levine said.

In rejecting bail, Gorenstein cited Alimehmeti’s “very strong ties” to Albania, where he was born and where his parents currently reside, the possibility of a lengthy prison sentence, the cash and combat-style knives found in his apartment and prior convictions for assault and robbery as proof that he was at risk to flee and a danger to the community.

The case evolved after Alimehmeti twice was rejected trying to enter the United Kingdom after authorities saw his camouflage clothing and nunchakus at Manchester Airport in October 2014 and Islamic State flag images on his cellphone in December 2014 at Heathrow Airport, authorities said.

A criminal complaint signed by an FBI agent described Alimehmeti as repeatedly demonstrating support for the Islamic State.

According to court papers, Alimehmeti tried this month to provide advice and assistance to an undercover operative he thought was traveling from New York to Syria to train and fight with the Islamic State.

The FBI complaint described how employees of the FBI and NYPD, posing as Islamic State recruits, gave Alimehmeti numerous opportunities to demonstrate his enthusiasm.

The FBI said Alimehmeti helped the undercover law enforcement operatives buy equipment needed to work for the Islamic State. Authorities said Alimehmeti repeatedly expressed his desire to help the group, even claiming that music videos including one depicting its fighters decapitating prisoners kept him motivated while he exercised.

READ MORE: Flames Use 4-Goal Outburst In 1st Period To Beat Devils

According to the court papers, Alimehmeti was told that one of his undercover law enforcement contacts was going to join the Islamic State and Alimehmeti “expressed his excitement at this and inquired whether he could travel,” as well.

The FBI said Alimehmeti told the law enforcement operatives that he had saved $2,500 for his own travel but needed to get a passport in a different name because his name was “already in the system.”

The feds say Alimehmeti also made multiple purchases of military-style knives and other military-type equipment.

U.S. Attorney Preet Bharara said Alimehmeti’s actions “show a clear intention to support a terrorist organization that is hell-bent on murder and mayhem.

The court papers also said Alimehmeti told the undercover contacts he and his brother “had our own plan” to travel from Albania to Syria but that his brother had been arrested in Albania.

In a footnote, the FBI said in court papers that Alimehmeti’s brother was arrested on weapons and assault charges in Albania last August.

Alimehmeti’s neighbors said they watched him become more radical.

“From one day to another, he started wearing traditional Muslim garb and then the beard and so forth,” Eddie Ayala said. “I hear weird noises at night all hours of the day.”

“I feel like he was just quiet and to himself, pretty much,” said neighbor Luis Rodriguez. “When I first met him, he was dressed regular – you know, in regular clothes, I can say. And then probably a year or two ago, that’s when he started getting real into his religion.”

But Alimehmeti’s friend, Laique Jamal, said he has known the suspect since he was a young child.

“He was a good Muslim kid, you know? He wasn’t no problem; no ISIS and all that, you know, all that dumb stuff,” Jamal said. “He wouldn’t kill his own people – I tell you that much.”

Alimehmeti could face 30 years in prison if convicted.

MORE NEWS: New York Weather: CBS2’s 10/27 Wednesday Morning Forecast

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)