NEW YORK (AP) — Three men were arrested Wednesday on charges of plotting to help the Islamic State group wage war against the United States, and federal officials said one of them spoke of shooting President Barack Obama or planting a bomb on Coney Island.

Akhror Saidakhmetov was arrested at Kennedy Airport, where he was attempting to board a flight to Istanbul on his way to Syria, authorities said. 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, is accused of helping fund Saidakhmetov's efforts to join the Islamic State group after Saidakhmetov's mother took away his passport to try to prevent him from traveling. Habibov was ordered held without bail in Florida.

The three, who are from Kazakhstan and Uzbekistan, are charged with attempt and conspiracy to provide material support to a terrorist organization. If convicted, each could face a maximum of 15 years in prison.

"This is real," New York Police Department Commissioner William Bratton said. "This is the concern about the lone wolf, inspired to act without ever going to the Mideast."

The Department of Justice has charged roughly 20 people in the past year with planning to travel to the Middle East to fight alongside militants like the Islamic State group, which controls parts of Syria and Iraq. Federal officials have been concerned about Americans going overseas to train with these groups and returning with plots to carry out attacks at home.

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

Federal prosecutors say Juraboev, 24, first came to the attention of law enforcement in August, when he posted on an Uzbek-language website that propagates the Islamic State 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."

Officials said they believed he planned to travel from Turkey to Syria to join the terror group. Prosecutors say Saidakhmetov, 19, also threatened an attack in the U.S. if he was unable to join the Islamic State. Juraboev's plans included attacks against Obama or planting a bomb on Coney Island, officials said.

Federal officials say Juraboev identified Saidakhmetov as a friend with a shared ideology. The two exchanged messages on how to get overseas, and Saidakhmetov and an informant watched videos of Islamic State training camps in Syria, according to court papers.

Saidakhmetov told the informant in September that he wanted to travel to Syria for jihad, or holy war, but that his concerned mother confiscated his passport, the complaint said. He said he would lie and tell her he planned to go to Uzbekistan to visit relatives. When he called to ask for his passport back, she hung up the phone.

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

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 booked a flight to Turkey on Feb. 19 and seemed like just another "regular American teenager," said workers who helped him at Nil Travel in Coney Island.

"He was just like anyone around us. He was totally normal. He wasn't nervous," said assistant manager Frank Cakir. "It's just scary."

Cakir said Saidakhmetov asked for the least expensive flight to Turkey and paid $571 by credit card for a round-trip ticket.

Habibov, 30, operates kiosks that repair phones and sell kitchenware in malls in Jacksonville, Florida; Savannah, Georgia; and Philadelphia. He employed Saidakhmetov last fall and winter and said he would help fund his travel, prosecutors said. The two were spotted in Brooklyn purchasing a ticket for Saidakhmetov to travel to Turkey, officials said.

Farhod Sulton, president of the Brooklyn-based Vatandosh Uzbek-American Federation, knew Habibov and said he was a "lost man."

"Abror was not educated. He was so eager to learn Islam, and he had a lot of questions," Sulton said. "A couple of times I remember warning him about his thoughts and where he was getting his information."

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

The FBI for the last year has expressed worries about the flow of Western fighters to Syria.

Bratton said this was the first public case in New York, but he hinted at ongoing investigations.

___

Associated Press writers Michael Balsamo, Verena Dobnik and Deepti Hajela in New York and Eric Tucker in Washington contributed to this report.