A teenager from Illinois is accused of trying to join ISIS.

Mohammed Hamzah Khan, 19, was detained at Chicago O’Hare International Airport ahead of a planned trip to Turkey.

Austrian Airlines alerted authorities to Khan’s itinerary. He bought his round-trip ticket just a week in advance, and his return flight was three days after his departure.

Panetta: Obama 'Lost His Way,' Battle Against ISIS Could Be '30-Year War'

​Palkot: One Round of Airstrikes in 5 Days as ISIS Moves Closer to Taking Syrian City Near Turkish Border

In a criminal complaint filed today, the suspect said that he had planned to join ISIS by traveling across Turkey to the border of Syria. He allegedly planned to join the terror group with the help of a Turkish contact he met online, and he expected his role in ISIS to be in a public service capacity.

Through a search warrant, authorities found handwritten notes at Khan’s home, expressing support for ISIS, as well as a letter to his parents in which he asked them not to contact authorities and invited them to join him in ISIS-controlled territories.

Khan waived his Miranda rights. He is facing up to 15 years in prison and a $250,000 fine. He will be back in court on Thursday.