Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Three men from Brooklyn, New York, were arrested on Wednesday and accused of plotting to wage jihad for ISIS. One of the men had offered to kill President Barack Obama if the militants asked him to, authorities said.

Federal prosecutors in Brooklyn identified the men as Abdurasul Juraboev, 24, Akhror Saidakhmetov, 19, and Abror Habibov, 30. Juraboev and Habibov are Uzbek citizens, and Saidakhmetov is a citizen of Kazakhstan, the prosecutors said.

Juraboev and Saidakhmetov plotted to travel to Turkey and then to Syria to wage jihad, and Habibov helped pay for the plan, the prosecutors said. Saidakhmetov was arrested at John F. Kennedy International Airport as he tried to board a flight to Istanbul.

“Anyone who threatens our citizens and our allies, here or abroad, will face the full force of American justice,” said Loretta Lynch, the top federal prosecutor in Brooklyn.

All three were charged with attempt and conspiracy to provide material support to ISIS. Each faces up to 15 years in prison.

Juraboev and Saidakhmetov were due in court in Brooklyn later in the day. Habibov appeared in court in Jacksonville, Florida, and was given a court date of March 3, NBC affiliate WTLV reported.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Juraboev attracted the attention of law enforcement in August when he posted on a pro-ISIS website, the prosecutors said. In the posting, he offered to kill Obama if ISIS asked him to, they said. His plans also included planting a bomb on Coney Island, the FBI said.

In the posting, Juraboev wondered what he might do while still in the United States, according to a criminal complaint: “What I’m saying is, to shoot Obama and then got shot ourselves, will it do? That will strike fear in the hearts of infidels.”

Saidakhmetov expressed an intention to shoot police officers and FBI agents if he couldn’t join ISIS in Syria, the prosecutors said.

“We treat that very seriously,” Commissioner Bill Bratton of the New York police said of the alleged potential U.S. attacks. “This is real.”

Juraboev and Saidakhmetov were identified as legal permanent residents of the United States. Habibov had overstayed a visa, New York police said. He runs kiosks in several states that sell kitchenware and repair cellphones, according to the criminal complaint.

As NBC News reported in October, social media is increasingly important both as a recruiting tool for terrorist groups and as a way for the FBI to stop would-be jihadis.

IN-DEPTH

SOCIAL

Juraboev plans for a terror attack included attacks against President Obama or planting a bomb on Coney Island — FBI New York (@NewYorkFBI) February 25, 2015

A different defendant, Saidakhmetov, expressed his intent to buy a machine gun and shoot police officers and FBI agents — FBI New York (@NewYorkFBI) February 25, 2015

This is a developing story. Please refresh for updates.

— Pete Williams and Jonathan Dienst