HARRISBURG, Pa. (AP) — A 19-year-old accused of trying to assist the Islamic State group, advocating violence against American citizens and helping people travel to Syria is a danger to the public and a flight risk, a federal judge ruled Wednesday, ordering the young man to remain jailed.

Jalil Ibn Ameer Aziz, of Harrisburg, pleaded not guilty to charges of conspiracy and trying to help a group designated by the U.S. government as a foreign terrorist organization. He faces up to 40 years if convicted of both counts.

"It is the defendant’s own words himself that link him to these offenses," Magistrate Judge Marty Carlson said.

Aziz smiled at people who described themselves as family when he was brought to court in prison attire, shackled at the hands and feet. He said little to Carlson during the 20-minute hearing.

Prosecutors say Aziz used Twitter to spread Islamic State propaganda and had concealed a bag loaded with ammunition behind a dryer in his home.

He has used 57 different Twitter accounts — all traced to the home he shares with his parents — to advocate violence, encourage people to fund jihadist groups and express a desire to travel to territory controlled by the Islamic State group, according to a complaint criminal complaint.

Assistant U.S. Attorney Daryl Bloom said Aziz has no job and has lived in the area for a short time. Aziz has no criminal history.

Defense lawyer Lori Ulrich described the bag as a backpack that contained nothing illegal. She said there were no guns in Aziz’s home when police arrested him.

He does not have money or a passport, so he has no way to travel outside the country, she told the judge.

Aziz’s trial was scheduled for early February, but it is likely to be postponed.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox