Alexandria, Virginia (CNN) -- A federal district court judge ruled Monday that 20-year-old Zachary Chesser, charged with providing material support to terrorists, must remain in custody without bail.
His attorneys had argued that their client should be released with an electronic monitor and stay with a third party, but the judge rejected the request, citing Chesser's alleged attempt to travel to Somalia -- bringing along his infant son to deflect suspicion -- to join the Islamist militant group Al-Shabaab.
He was arrested Wednesday. If convicted, Chesser could face a prison sentence of up to 15 years.
Chesser is accused of posting an online attack against the creators of the animated TV series "South Park," as well as information on explosives meant to be used to kill civilians.
Prosecutors also say Chesser, of Fairfax County, Virginia, had exchanged e-mails with Yemeni-American cleric Anwar al-Awlaki, whose name has been linked to an attack and an attempted attack on the United States.
Chesser had been on the FBI's radar previously. He was questioned in 2009 about his internet postings and e-mail communications with al-Awlaki.
U.S. officials revealed that they had been staging court-ordered electronic surveillance of Chesser.
In April, Chesser, who also goes by the name Abu Talhah al Amrikee, authored a post on a radical Islamic website that included a warning to the creators of "South Park" after an episode of the cartoon series depicted the Prophet Mohammed in a bear suit.
The posting on Revolutionmuslim.com says: "We have to warn Matt [Stone] and Trey [Parker] that what they are doing is stupid and they will probably wind up like Theo van Gogh for airing this show. This is not a threat, but a warning of the reality of what will likely happen to them."
Van Gogh, a Dutch filmmaker, was murdered by an Islamic extremist in 2004 after making a short documentary on violence against women in some Islamic societies. The internet posting features a graphic photograph of van Gogh with his throat cut and a dagger in his chest.
The entry goes on to advise readers: "You can contact them [the makers of "South Park"], or pay Comedy Central or their own company a visit at these addresses ... " and lists Comedy Central's New York address and the Los Angeles, California, address of Parker and Stone's production company.
Chesser told CNN at the time that providing the addresses was not intended as a threat but to give people the opportunity to protest.
An affidavit from prosecutors details other videos and postings allegedly from Chesser, including a link to an Army Ranger handbook with information on explosive devices and a post about "desensitizing" police by leaving fake suspicious bags around in public places.
The FBI agent who spoke with Chesser on July 14 said that "Chesser stated that he was an influential person in the Jihadi community, and could be considered one of the top individuals in this area."
Chesser allegedly tried to fly to Uganda on July 10 and then on to Somalia.
According to an affidavit, he tried to take his infant son with him, telling his wife it was part of his "cover" to make it less likely anyone would suspect he was trying to go to Somalia to join Al-Shabaab.
The court documents said Chesser was not allowed to depart the country July 10 but was told by the airline he was on the "no-fly list" and was questioned by a Secret Service agent. He was not arrested, and according to the documents, he contacted an FBI agent and said he wanted to provide information about Al-Shabaab.
In subsequent interviews with the FBI, Chesser allegedly said he had been in contact with Al-Shabaab, felt that he would have no problem joining the group when he reached Somalia and knew it had been designated as a terrorist group by the U.S. government.
Court documents say Chesser thought that after training, he would be placed in the group's media branch but that people in that position still engage in fighting. He allegedly said he unsuccessfully attempted to travel to Somalia in 2009.
Prosecutors also say Chesser posted a variety of materials online, including the Ranger handbook and another from the Transportation Security Administration, with the intent of telling adherents to the jihadi movement how to best use that information to kill civilians and law enforcement personnel.
In 2009, he allegedly told the FBI that he had sent several e-mail messages to al-Awlaki and that the cleric replied to two of them. U.S. officials say al-Awlaki also had communications with Umar Farouk AbdulMutallab, who is accused of attempting to blow up an airliner over Detroit, Michigan, on December 25, and with Army Maj. Nidal Hasan, who is accused of the shooting deaths of 13 people at Fort Hood, Texas, in November.
A search of Chesser's home uncovered a handwritten note called "How to Destroy the West" that contained a bulleted list of activities including a cyber attack and attacks on "personelle," the affidavit said.
"Under the attacks on personnel," Chesser wrote 'put out a message to the Muslims to go buy guns and kill soldiers' and 'Fill a tanker with explosives and Ricin,'" a toxic protein extracted from castor beans, the affidavit said.
CNN's Carol Cratty and Bill Mears contributed to this report.