Fort Meade - WikiLeaks suspect Bradley Manning was placed in solitary confinement at a military jail to protect him from attacks by "patriotic" inmates, the Marine brig commander said on Thursday.
James Averhart, in charge of the Marine Corps Brig in Quantico, Virginia, where Manning was held for nine months, said the suspect was held as a "maximum security prisoner" for his own safety.
"A lot of the population was very patriotic and knew about the allegations" that Manning had leaked a trove of military and diplomatic documents to the anti-secrecy website run by Julian Assange, Averhart said.
"It was my responsibility if something could happen outside the [maximum security] facility to Manning."
Manning's attorneys say the conditions of his detention at Quantico amount to "unlawful pretrial punishment", and were so arduous that the case should be dropped.
The charges against the army private - which include "aiding the enemy", chiefly al-Qaeda - could see him spend the rest of his life in jail if convicted.
Averhart testified that other factors were also taken into account when deciding to hold Manning under such strict conditions, including his "depression" and "anxiety" over the charges that he faced.
The custody regime meant he was stripped of almost all his clothes at night under strict prevention of injury guidelines that military commanders contend were put in place because Manning was a suicide risk.
He was held under 24-hour suicide watch in a tiny cell and allowed only 20 minutes of sunlight a day.
Questioned by Manning's civilian lawyer David Coombs, the commander said he worried about placing the private under normal prison conditions out of fear of "provocation from him [Manning] to them [other prisoners], and them to him".
The other detainees "knew what was going on with the newspapers" about Manning's charges, Averhart added.
But he recognised that his fears were not based on any written reports from the guards. Rather, Averhart said, it was "just a feeling".
Averhart was among prison officials who recommended that Manning be kept on suicide watch even after psychiatrists said such conditions were not necessary. The strict detention regime is meant to prevent a detainee from escaping or harming himself.
Manning, aged 24, was serving in Iraq as a US army intelligence analyst when he was arrested in May 2010.
After he was arrested and questioned in Iraq, Manning was sent to a US jail in neighbouring Kuwait. He was transferred to the Quantico jail two months later.
Manning was held at Quantico for nine months until April 2011, when he was transferred to a US Army prison at Fort Leavenworth, Kansas.
His case is expected to go to trial in March.
Another nine to 12 witnesses are expected to testify between now and next week, according to legal experts.