CHICAGO (AP) — A 19-year-old American left a letter expressing disgust with Western society for his parents before trying to board a plane in Chicago, the first step in his plan to sneak into Syria to join the Islamic State group, according to a federal criminal complaint released Monday.

Mohammed Hamzah Khan, a U.S. citizen who lived with his parents in the Chicago suburb of Bolingbrook, was arrested Saturday while trying to board a plane to Turkey, which borders Syria, at O’Hare International Airport. He is charged with attempting to provide material support to a foreign terrorist group.

Before heading to the airport, Khan allegedly left a three-page, handwritten letter in his bedroom for his parents, explaining why he chose to join the Islamic State. The letter, according to the complaint, read: “We are all witness that the western societies are getting more immoral day by day.”

Investigators say Khan also wrote that he was upset that his U.S. taxes were going to kill his “Muslim brothers and sisters,” an apparent reference to a bombing campaign against Islamic State militants by the U.S and other nations. The letter was signed, “Your loving son.”

Khan appeared in a federal court Monday in orange jail clothes, calmly telling a federal magistrate that he understood the allegations. Later, as marshals led him away in handcuffs, the slight, bearded young man turned to smile at his parents at the back of the room.

Around 12 Americans are believed to be fighting in Syria now, FBI Director James Comey has said. More than 100 Americans have either tried to go to Syria and were arrested, or went and came back to the U.S., Comey said, without offering more details.

Khan sought to fly Austrian Airlines to Istanbul by way of Vienna when customs officers stopped him as he passed through security at O’Hare’s international terminal. While FBI agents interviewed him there, investigators executed a search warrant at Khan’s home.

It wasn’t clear why authorities chose to stop Khan. Neither prosecutors nor Khan’s attorney spoke after Monday’s hearing. His parents also didn’t comment.

During the search of his home, FBI agents found the letter and other documents. One page in a notebook had a drawing of what appeared to be an armed fighter with an Islamic State flag and the words “Come to Jihad” written in Arabic, according to the complaint.

Also found were drawings with arrows indicating where Khan might make border crossings into Syria and mentioning the city of Urfa, which the complaint says is in southeastern Turkey near the Syrian border.

During the FBI interview, Khan allegedly said an online source gave him the number of a person he should contact when he got to Istanbul and that, in turn, the person would led him to Islamic State members.

Asked by agents what he would do once he arrived in territory controlled by the Islamic State, Khan allegedly said he would — in the words of the complaint — “be involved in some type of public service, a police force, humanitarian work or a combat role.”

In the letter to his parents, Khan also warned in capital letters, “FIRST and FOREMOST, PLEASE MAKE SURE NOT TO TELL THE AUTHORITIES,” according to the complaint.

U.S. Magistrate Judge Susan Cox ordered that Khan be held at least until a detention hearing Thursday. Prosecutors indicated in court they would ask that he be kept behind bars pending trial.

If convicted, Khan could face a maximum 15-year prison sentence.

___

Follow Michael Tarm on Twitter at http://twitter.com/mtarm