After hearing arguments for over an hour, US District Magistrate Judge A. David Copperthite agreed with the government that Martin poses a serious "risk of flight" and said he felt compelled to enter the detention order given Martin's history, conduct and the "nature of the offense charged."
Martin -- a 51-year-old former contractor to the National Security Agency with consulting firm Booz Allen -- was charged in August with stealing government property and unauthorized removal of classified materials after searches of his home and car revealed thousands of hard-copy and digital files containing classified information.
"It is clear that the defendant has been engaged in this conduct for 18 or 20 years," Copperthite said.
Entering the courtroom in handcuffs, glasses and a gray-striped jumpsuit, Martin took a seat at the counsel's table and sat silently throughout the hearing -- wiping his eyes at one point as his attorney spoke about his love of America.
Characterizing the alleged theft of classified information as "extremely dishonorable crimes putting our service members at risk," Assistant US Attorney Zachary A. Myers called Martin a "high-value recruitment target" for foreign nations seeking to do grievous harm to the US.
"An ankle monitor won't prevent from him from going down the road and ending up in territory where we can't recover him," Myers said.
Referring to their client as "Hal," Martin's defense attorneys argued that their client did not pose a threat or flight risk. Instead, public defender James Wyda depicted Martin as an "eclectic" man suffering from "compulsive hoarding" and struggling to pay his mortgage and student loans.
"He isn't Edward Snowden," Wyda said. "He believes in service to his country and believes in hard work."
Describing a disheveled shed where Martin kept additional classified material as covered with "dust everywhere," Wyda added: "This is not how a Russian spy would ever conduct business."
The defense team further stressed that the government has "no evidence" that Martin shared the classified information he stole with anyone and "there is nothing to indicate that Hal Martin is a traitor."
On Thursday, Booz Allen announced it had hired former FBI director Robert Mueller to conduct an outside review of the firm's security and management processes.
"We are committed to doing our part to detect potential insider threats, which are complex and constantly evolving," Booz Allen, which is cooperating with the federal probe, said in a statement. "If there are areas where Booz Allen can improve, we will address them."
While the government suggested in its court filings that it intends to seek additional charges against Martin, Copperthite noted that prosecutors have yet to charge him with dissemination of any classified material.
Prosecutors had no comment on the case after the hearing, but Wyda told reporters that the defense team plans to promptly appeal Copperthite's detention order.
Martin faces a maximum sentence of one year in prison for the unauthorized removal and retention of classified materials and 10 years in prison for theft of government property.
Martin's wife, Deb Shaw, sat in the courtroom accompanied by Martin's brother, pastor and other friends.
"I'm OK. I love you," Martin mouthed to his wife as his left the courtroom.
Asked outside the courtroom for a response, Shaw would only say, "I love him. That's it."