A military judge ruled on Tuesday that a former Army intelligence analyst accused of leaking hundreds of thousands of sensitive US documents to WikiLeaks was subject to improper treatment during a portion of his pretrial detention in a US Marine Corps lockup.

The judge, US Army Col. Denise Lind, said she would give former analyst Pfc. Bradley Manning credit for 112 days of time served off any potential future sentence.

But Judge Lind refused a defense request that she throw out all or part of the charges against Manning to punish the government for its misconduct.

Defense lawyers had asked the judge to dismiss the government’s case against their client based on the unusually harsh treatment he faced in a detention facility at Quantico, Va., following his arrest in 2010 for allegedly facilitating the largest leak of classified documents in US history.

The defense had also asked, in the alternative, that the judge give Manning potential credit of 10 days off any future sentence for every day he spent under improper conditions of pretrial confinement.

Although prosecutors appear to have lost, the judge’s ruling marks a toothless victory for the defense. Manning is charged with violating 22 separate counts, including that he aided the enemy. The 25-year-old private is facing a potential sentence of life in prison.

In contrast to Lind’s 112-day determination, it is not uncommon for judges to allow defendants held while awaiting trial to receive full credit for the amount of time spent in pretrial detention. They typically receive that full credit even when they aren’t subject to what Lind determined were improper and punitive conditions of confinement in the Manning case.

The judge read her decision in open court. She said Manning’s detention was “more rigorous than necessary,” according to the Associated Press. She also concluded that the government’s treatment of Manning “became excessive in relation to legitimate government interests.”

Manning was held alone in a cell for nearly nine months and kept on a highly restrictive suicide watch for much of that time despite the recommendation of a mental health adviser that the watch be lifted and his conditions of confinement be eased.

Manning and his lawyers argued that the tough treatment was illegal punishment meted out by military officials who failed to honor the requirement that defendants be treated as innocent until proven guilty.

Detention officials defended the decision to maintain the suicide watch and other tough measures, despite the earlier recommendation that conditions be eased. They said months earlier the same mental health expert had made a similar recommendation that a prisoner’s watch status be downgraded. That prisoner committed suicide in the facility.

News of Manning’s harsh treatment sparked protests at the gates of the Marine base at Quantico. In April 2011, he was moved to a medium-security pretrial detention facility at Fort Leavenworth, Kan.

Because of reports of his harsh treatment by the US military, Manning has attracted a significant following of supporters who view him as a crusading whistle-blower. Some expressed disappointment after the judge’s ruling.

“She confirmed that Bradley was mistreated, and vindicated the massive protest that was required to stop the Marines at Quantico from torturing Bradley,” said Jeff Paterson of the Bradley Manning Support Network.

“Yes, 112 days is not nearly enough to hold the military accountable for their actions,” he added, in a statement.

Manning’s trial is set to begin in early March in a military courtroom at Fort Meade, Md.

Lind’s ruling came on the first day of a new round of pretrial hearings this week. At issue is whether jurors should be allowed to assess Manning’s possible motives in deciding to leak certain documents.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Defense lawyers say their client was careful to release only documents he believed would not damage US national security or otherwise aid America’s enemies.

The leaked documents included diplomatic cables, battle reports from Iraq and Afghanistan, and intelligence assessments of terrorism suspects being held at Guantánamo. They were subsequently released to the public on the WikiLeaks website.