WEST HAVEN, Conn. (WTNH) — A West Haven man pleaded guilty Wednesday to planning to travel to the Middle East and join the Islamic State of Iraq and al-Sham, better known as ISIS.

Ahmad Khalil Elshazly, 25, “pledged allegiance” to ISIS and its leader, Abu Bakr Al-Baghdadi, in September 2018, according to U.S. States Attorney Vanessa Roberts Avery. After Al-Baghdadi’s death, he sent a message to the group’s new leader to pledge his allegiance to him.

“Today, the diligent efforts of law enforcement has culminated in a guilty plea of a conspirator of potential terrorist crimes against the people of the United States,” FBI Special Agent in Charge Sundberg said in the written announcement.  “Our top priority of the FBI remains the disruption of would-be terrorists and the havoc they attempt to cause here and abroad.  Justice has been served.”

Elshazly paid $500 in December 2019 to a person he thought was an ISIS facilitator to smuggle him to Turkey, according to Avery. Once there, he planned to find others who would help him reach ISIS in Syria.

He was arrested in Stonington before he was able to board a boat.

When sentenced, he will face up to 20 years in prison.