(CBS) — An 18-year-old Aurora man accused of trying to join a terrorism organization overseas might be confined at home as he awaits a federal trial, but federal prosecutors will challenge a judge’s ruling on the suspect’s bond.

Abdella Ahmad Tounisi was arrested by the FBI last month as he tried to board an international flight at O’Hare Airport, accused of trying to travel to Syria to join a militant jihad group. He had been communicating with recruiter online who was really an undercover agent, federal authorities say.

READ MORE: Jussie Smollett Trial: Lead Detective In Investigation Explains On Witness Stand How Smollett Went From Victim To Suspect

In a rare move for a terror case, U.S. Magistrate Judge Daniel Martin agreed Thursday to release Tounisi on home confinement, on $50,000 unsecured bond, but stayed his own order for 24 hours to give prosecutors time to decide whether to appeal his ruling, meaning Tounisi won’t be released right away. He also ordered Tounisi placed on electronic monitoring, and said his parents must install a land-based phone line at their Aurora home to comply with the home confinement orders.

Randall Samborn, a spokesman for the U.S. Attorney’s office, said federal prosecutors would appeal Martin’s ruling. A hearing has been set for 10:30 a.m. on Friday before U.S. District Judge Edmond Chang.

The government says Tounisi was about to link up with terrorists and that he had wanted to blow up a nightclub in Naperville.

READ MORE: Chicago Weather: Slight Chance For Rain Wednesday Morning, Warmer During Day

“People very young can do terrible things,” one prosecutor told the judge.

At Thursday’s hearing, Martin admonished Tounisi about the seriousness of the allegations against him, telling him to take the case seriously.

Tounisi was charged with attempting to provide material support to terrorism. He had been under federal scrutiny because he was a friend of Adel Daoud, a west suburban man charged with trying to blow up a downtown Chicago bar last year.

Daoud, who also awaits trial, also had been communicating and making plans with federal undercover operatives, authorities say.

MORE NEWS: View Live Radar

Tounisi’s family and supporters deny he is a would-be terrorist.