Updated

A federal judge has agreed to release an Illinois teenager charged with trying to support a foreign terrorist organization.

U.S. Magistrate Daniel Martin ruled Thursday that 18-year-old Abdella Ahmad Tounisi could be released under home confinement. The Aurora man was friends with a man charged last year with trying to bomb a Chicago bar.

The FBI says Tounisi was trying to join a terrorist group in war-torn Syria when he was arrested at an airport. He was nabbed after contacting a sham website that the FBI set up purporting to hook up would-be fighters with terrorists.

The judge warned Tounisi at a hearing to take the allegations seriously.

Tounisi allegedly hoped to join an al-Qaida-affiliated group fighting Syrian President Bashar Assad's regime in a bloody civil war.