Investigators found an Islamic State flag and a passport wrapped in $2,400 in cash when they arrested a young Bronx man Tuesday on charges that he tried to support the terror organization, a prosecutor said.

Sajmir Alimehmeti, a onetime plumbing assistant who has studied funeral services, was ordered held without bail after 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. The 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 New York City Police Department, 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.

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 court papers 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.