CHICAGO — A federal judge on Friday quashed another judge’s surprise order to release an Illinois teenager facing charges that he sought to join al-Qaida-linked militants in Syria.

Abdella Ahmad Tounisi, 18, of Aurora, posed a potential threat to not just to Illinois and the United States but to “the entire world community,” U.S. District Judge Edmond Chang told a Chicago courtroom.

Tounisi himself showed little emotion as Chang ordered he be held pending trial. But his mother, Seham Tounisi, appeared distraught and left the courtroom crying, her husband seeking to comfort her. A woman with her said, “This is unfair! This is unfair!”

The day before, U.S. Magistrate Judge Daniel Martin ruled Tounisi could be released under home confinement as he awaits trial. But Martin stayed his own release order to give prosecutors 24 hours to appeal. They did so, saying Martin made a mistake.

Tounisi, a U.S. citizen, was arrested at O’Hare International Airport last month as he allegedly prepared for the first leg of a trip to join al-Qaida-affiliated Jabhat al-Nusrah, which is fighting Syrian President Bashar Assad’s regime. He was snared in an Internet sting after contacting a sham website set up by the FBI that purported to connect would-be fighters with terrorists, federal prosecutors said.

Prosecutors also argued that Tounisi had expressed a wish to die a martyr and that a terrorist crime typically “may only be committed once.”

Tounisi’s lawyer noted that the teen had no prior criminal record. He is charged with one count of attempting to provide material support to a foreign terrorist organization. If convicted, he faces a maximum 15-year prison term.

Legal observers say orders allowing terrorist suspects out of jail pending trial are rare.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.