Two men in Southern California were taken into federal custody on Thursday after allegedly conspiring to travel to the Middle East to join the ranks with the Islamic State, an extreme Muslim terror group.

The FBI arrested one of the men at the Los Angeles International Airport, while the other man was arrested the same day in Orange County, NBC News reported.

FBI spokeswoman Laura Eimiller identified the men as Muhanad Badawi and Nader Elhuzayel, both aged 24.

After being arrested, officials say that Elhuzayel admitted to investigators that he had planned to travel to Istanbul and join Islamic State forces in Syria and Iraq.

Meanwhile, government officials say Badawi had indicated that he planned to travel to the Middle East in the future.

Eimiller also confirmed to Reuters that the men in those locations had been arrested following a joint terrorism task force investigation. She added that the men were due to appear in federal court in Santa Ana Friday afternoon.

According to a statement released by the U.S. Attorney's Office, Elhuzayel tweeted on May 3 that he supported two gunmen who attacked an anti-Muslim drawing contest of the Prophet Mohammed in Texas earlier this month. After the men open fired outside of the provocative contest, they wounded a security guard before they were instantly shot and killed by police, reports CNN.

Court documents say there is evidence that Badawi and Elhuzayel spoke to each other last month, expressing support for ISIS and dying on the battlefield.

On May 7, Elhuzayel was given permission by Badawi to use his credit card to purchase a one-way ticket from Los Angeles to Tel Aviv in Israel. The Turkish Airlines flight was also scheduled to stop in Istanbul.

If convicted of conspiring to provide material support to ISIS, the suspects could face up to 15 years in prison.