Three America-hating extremists who live in Brooklyn were busted Wednesday in a wide-ranging terror plot that included joining ISIS, killing President Obama, hijacking an airplane and bombing Coney Island, federal officials said.

One of the men was grabbed at JFK Airport attempting to board a 12:30 a.m. flight to Ukraine en route to Turkey, where he allegedly planned to sneak across the border into Syria and become an Islamic State terrorist.

Kazakh national Akhror Saidakhmetov, 19, “tried to resist a little bit,” but was quickly overpowered by about 20 members of the Joint Terrorism Task Force who confronted him at the jetway, sources said.

Another defendant, Uzbeki native Abdulrasul Hasanovich Juraboev, 24, had a plane ticket to Turkey for March 29. He was busted at his home in Brooklyn.

The third man, Arbor Habibov, 30, an illegal alien from Uzbekistan, was arrested in Florida, one of several states where he runs shopping-mall kiosks that sell kitchenware and repair cellphones, according to the feds.

Sources said all three men are Muslims, and Juraboev met a paid FBI informant while attending an unidentified mosque, court papers state.

“The defendants violated the true tenets of their faith in pursuit of their radical, violent agenda,” New York FBI Assistant Director in Charge Diego Rodriguez said.

A highly detailed, 23-page complaint filed in Brooklyn federal court charged that the men have been scheming since at least August to “provide material support and resources” to ISIS.

Court papers outline a series of US-based terror plots:

Assassinating Obama. Last Aug. 8, the feds say, Juraboev ranted online that he wanted to pledge allegiance to ISIS and become a martyr by killing the president. “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,” he allegedly wrote in Uzbek on an ISIS-related website.

Hijacking an airplane. On Feb. 18, Saidakhmetov plotted to travel to Turkey with an informant and “proposed finding an excuse to gain access to the pilot’s cabin and diverting the plane to the Islamic State, so that the Islamic State would gain a plane,” court papers say.

Bombing Coney Island. During an Aug. 18 interview with law enforcement agents, Juraboev allegedly said he would “plant a bomb on Coney Island if he were so ordered by [ISIS],” court papers say.

Spying on the US military and killing soldiers. During a secretly recorded conversation last Nov. 14, Saidakhmetov allegedly told Juraboev that he wanted to enlist so he could serve as an ISIS spy, or else just “When Juraboev expressed skepticism … Saidakhmetov responded that he could always open fire on American soldiers and kill as many of them as possible.”

Murdering cops and FBI agents. On Jan. 11, Saidakhmetov allegedly told the informant that if he couldn’t get travel documents to go to Syria, “I will just buy a machine gun, an AK-47, go out and shoot all police,” court papers say. He allegedly continued: “It is legal in America to carry a gun. We will go and purchase one handgun . . . then go and shoot one police officer. Boom . . . Then, we will take his gun, bullets and a bulletproof vest . . . then we will do the same with a couple of others. Then we will go the FBI headquarters, kill the FBI people.”

The feds said they caught wind of the trio through Juraboev’s Aug. 8 post on the now-defunct Hilofatnews.com website.

The feds traced the post to an Internet address located in Brooklyn, where Juraboev allegedly admitted writing the screed when agents went there on Aug. 15.

During a follow-up interview three days later, he also allegedly identified Saidakhmetov as a friend and co-worker who shared his radical views.

Agents then later found an Aug. 4 online Hilofatnews post in which Saidakhmetov gleefully wrote about watching mass executions of Iraqi soldiers in an ISIS video, court papers say.

“Allohu Akhbar I was very happy after reading this, my eyes joyful so much victory,” he allegedly wrote.

According to the complaint, Saidakhmetov’s mom threw a wrench into his plans by confiscating his passport when she learned he wanted to join ISIS in Syria.

When he couldn’t convince her to give it back, Saidakhmetov allegedly forged an application for permission to travel without his passport, and exulted when it was approved.

“After opening the envelope containing the travel document, Saidakhmetov told the [informant] that his soul was already on its way to paradise and made the sound of a horn,” court papers say.

Saidakhmetov and Juraboev both appeared briefly in Brooklyn federal court Wednesday evening and were ordered held without bail.

“Both of them confessed that the purpose of their travel was to go to Syria and join ISIS and to wage jihad on behalf of ISIS,” prosecutor Douglas Pravda said.

Habibov was also ordered held without bail when he appeared in federal court in Jacksonville, Fla.

Also Wednesday, FBI Director James Comey said the bureau was investigating suspected ISIS supporters “in various stages of radicalizing in all 50 states.”