A man arrested at Chicago’s O’Hare International Airport has been charged with terrorism charges for trying to join ISIS after traveling to Turkey. Joshua Van Haften, 34, from Madison, Wisconsin was taken into custody by the FBI when he arrived in back in Chicago on Tuesday. Prosecutors say that he is accused of attempting to provide material support and resources to a foreign terrorist organization. If he is convicted of the charges, he faces up to 15 years in federal prison.

Van Haften reportedly traveled from Chicago to Istanbul, Turkey on Aug. 26, 2014 with the intention of joining ISIS in Syria. Those hoping to join ISIS fighters have often used Turkey as their entry point into Syria. Van Haften apparently never made it into Syria and it is unclear why. Included in the complaint were a series of Facebook posts in which Van Haften described his failed efforts getting to Syria and frustration about being stuck in Istanbul.

In a statement, Assistant U.S. Attorney General John Carlin said, “Stemming the flow of foreign fighters to Iraq and Syria, and holding accountable those who attempt to provide material support to designated foreign terrorist organizations, remains a top priority for the National Security Division.” According to federal law enforcement officials, Van Haften will make his initial court appearance in federal court in Madison.

Van Haften formerly resided in Beloit, Wisconsin and graduated from Blackhawk Technical College with a qualification in Fire Science. He is a convicted child sex offender, convicted of the second-degree sexual assault of a child in 2000, according to court records. He was sentenced to seven years in prison in that case. Van Haften was also arrested when he was 17 for pointing a gun at his ex-girlfriend’s new boyfriend, according to a 1998 report in the Beloit Daily News. The man was disfigured when Van Haften hit him in the ear with the gun. According to the report, law enforcement charged him with substantial battery in the case.

Van Haften’s arrest was just the latest in a string of arrests of Americans on terror charges for trying to join terrorist organizations. In many of the other cases, the suspects have been arrested as they were about to board flights, not as they returned.