Two men arrested on charges of plotting to help ISIS were vocal both online and in personal conversations about their commitment and desire to join the extremists, with one of them speaking of shooting President Barack Obama to "strike fear in the hearts of infidels," federal authorities said.

The men were among three charged Wednesday with attempt and conspiracy to provide material support to a terrorist organization.

Akhror Saidakhmetov, 19, was arrested at Kennedy Airport, where he was attempting to board a flight to Istanbul, with plans to head to Syria, authorities said. Another man, 24-year-old Abdurasul Hasanovich Juraboev, had a ticket to travel to Istanbul next month and was arrested in Brooklyn, federal prosecutors said. The two were held without bail after a brief court appearance.

A third defendant, Abror Habibov, 30, is accused of helping fund Saidakhmetov's efforts. He was ordered held without bail in Florida.

If convicted, each faces a maximum of 15 years in prison.

New York Police Department Commissioner William Bratton said this was the first public case in New York involving possible fighters going to the Islamic State, but he hinted at ongoing investigations.

"This is real," Bratton said. "This is the concern about the lone wolf, inspired to act without ever going to the Mideast."

Authorities said Juraboev first came to the attention of law enforcement in August, when he posted on an Uzbek-language website that propagates ISIS' ideology.

"Greetings! We too want to pledge our allegiance and commit ourselves while not present there," he wrote, according to federal authorities. "Is it possible to commit ourselves as dedicated martyrs anyway while here?"

"What I'm saying is, to shoot Obama and then get shot ourselves, will it do? That will strike fear in the hearts of infidels."

Saidakhmetov's mother took away his passport to try to prevent him from traveling, according to the federal complaint. When he called his mother and asked for it back, she ended up hanging up on him. She had asked him where he wanted to go and he said that a person who had the chance to join ISIS and didn't would face divine judgment.

Habibov had recently been a Brooklyn resident before moving a few years ago and falling out of contact with the borough's Uzbek community, said Farhod Sulton, president of the Brooklyn-based Vatandosh Uzbek-American Federation.

At some point, he stopped coming to Uzbek gatherings, Sulton said, and he was reading extremist literature. "We had a tense conversation about the ultra-orthodox understanding of Islam. I think he got into the wrong hands in terms of learning Islam."

Loretta Lynch, who is Obama's choice to be U.S. attorney general, said "The flow of foreign fighters to Syria represents an evolving threat to our country and to our allies."

Saidakhmetov's attorney, Adam Perlmutter, said his client was a "young, innocent kid" who would plead not guilty.

"This is the type of case that highlights everything that is wrong with how the Justice Department approaches these cases," Perlmutter said. Juraboev's attorney had no immediate comment.

Saidakhmetov is a Brooklyn resident and citizen of Kazakhstan. Juraboev is a Brooklyn resident from Uzbekistan. Habibov had been in the U.S. legally, but his visa had expired. He was appointed a public defender on Wednesday.

ISIS largely consists of Sunni militants from Iraq and Syria but has also drawn fighters from across the Muslim world and Europe.