In an unprecedented court decision, a federal judge has ruled that an Illinois man charged with allegedly attempting to support a foreign terrorist group be released from prison as he awaits trial.

U.S. Magistrate Judge Daniel Martin handed down a decision Thursday to release 18-year-old Abdella Ahmad Tounisi from prison and allow him to await his upcoming trial date under home confinement, strapped with an electronic monitoring device.

As part of Martin's ruling, the judge mandated that Tounisi's family also install a landline in their home, which is located in Aurora, IL, a requirement for complying with the home confinement decision.

Tounisi was arrested last month by federal agents who conducted an online sting after the teen made plans to travel from Chicago's O'Hare Airport to Syria to join a militant group alleged to have ties to al-Queda. The young man was officially charged with one count of attempting to provide material support to a foreign terrorist organization, according to reports.

If Tounisi is convicted of the alleged crime, he faces a prison sentence of up to 15 years.

After handing down his ruling in court today, Martin stayed his order at the request of federal prosecutors in order to give them 24 hours to file an emergency appeal of Tounisi's release. If such an appeal falls through, the young man would be released from prison on Friday. If the federal appeal is successful, the ruling on Tounisi's release will be handed over to District Judge Edmond Chang.

A separate complaint has been filed in relation to Tounisi and another terrorist tie, the Washington Post reports. The complaint fingers Tounisi as a close friend of Adel Daoud, a teen from the greater Chicago area who was arrested last year and charged with plans to detonate a device he believed to be a bomb outside of a bar in the downtown area of the city.

Federal prosecutors, however, point out that Tounisi was not accused of participating in the alleged terrorist bombing attempt that was planned entirely by Daoud.