Back in the summer of 2014, Juraboev, 24, and Saidakhmetov, 19, had expressed support online for the establishment of an Islamic caliphate in Iraq in Syria, authorities said.

They went on to devise a plan to travel to Turkey and then Syria to wage jihad, authorities said.

Saidakhmetov was arrested early Wednesday morning at John F. Kennedy International Airport as he was about to board a flight to Istanbul.

According to authorities, Juraboev posted on an Uzbek-language website that he would try to kill President Barack Obama if ordered to do so by ISIS.

Saidakhmetov allegedly plotted to buy a machine gun and kill police officers and FBI agents if he was unable to join ISIS in Syria, authorities said.

ISIS is also known as ISIL, which stands for the Islamic State of Iraq and the Levant.

“We will vigorously prosecute those who attempt to travel to Syria to wage violent jihad on behalf of ISIL and those who support them,” said U.S. Attorney Loretta Lynch. “Anyone who threatens our citizens and our allies, here or abroad, will face the full force of American justice.”

“ISIL calls on its followers to come fight for the terrorist organization in Syria, and in messages to followers outside Syria, ISIL has called on them to attack police, intelligence officers or the military in their home countries including the United States,” said NYPD Commissioner Bill Bratton. “By pledging allegiance to ISIL, these defendants conspired to fight for a designated foreign terrorist organization either in Syria, or even New York.”

“The defendants looked to join the Islamic State of Iraq and the Levant, by flying to Turkey in a vain attempt to evade detection. And several of the defendants planned to commit acts of terror here-in America-if they could not travel, to include killing FBI agents. The defendants violated the true tenants of their faith in pursuit of their radical, violent agenda,” said FBI Assistant Director in Charge Diego Rodriguez. “We rely on help from the community, the public and religious leaders to be mindful of those who could be radicalized. We cannot do this alone.”