Former U.S. soldier who allegedly tried to join Somali terrorist group denied bail January 12, 2012 -- Updated 0025 GMT (0825 HKT) A federal judge rules Craig Benedict Baxam is a flight risk and a possible danger Baxam is charged with attempting to travel to Somalia to join a terrorist group He is a former U.S. Army soldier Baxam was arrested Friday as he returned from a failed effort to join Al-Shabaab WASHINGTON (CNN) -- A former U.S. Army soldier charged with attempting to travel to Somalia to join a terrorist group was denied bail Wednesday and will remain in jail pending trial. In a detention hearing for Craig Benedict Baxam, a federal judge ruled he would be detained as a flight risk and a possible danger to the community, according to the Maryland U.S. attorney's office. Baxam was arrested Friday at Baltimore-Washington International Airport as he returned from a failed effort to get to Somalia to join Al-Shabaab, authorities said. According to a criminal complaint filed on Monday, Baxam departed the United States on December 20 en route to Kenya and tried to travel on to Somalia from there. Three days later, Kenyan Police stopped a bus on which Baxam was traveling and arrested him on suspicion of terrorism. According to the criminal complaint, Baxam said he was "looking for dying (sic) with a gun in my hand" and said he would be guaranteed a place in paradise. The court document does not explain why Baxam left the Army early. A law enforcement official said there is nothing to suggest Baxam compromised any military information. Baxam told FBI agents he had no religious affiliation but while surfing the Internet he found an Islamic religious website. The criminal complaint states there was an article on the site about the "day of judgment" that struck Baxam and that "Baxam read more and immediately realized that Islam was the truth." "Mr. Baxam was caught in Kenya before he reached Somalia, and there is no allegation that anyone assisted him," said Rod Rosenstein, U.S. attorney for the District of Maryland on Monday. According to the criminal complaint, Baxam told the FBI he didn't have names of any Al-Shabaab contacts to reach out to in Somalia but that he "trusted in Allah." Prosecutors say Baxam cashed out his retirement savings account of a little over $3,600 dollars and purchased a round trip ticket to Kenya to avoid arousing suspicion, but he planned to remain in Somalia. He allegedly intended to give Al-Shabaab some amount between $600 and $700 dollars as an offering upon his arrival, authorities said.