A US judge on Tuesday reduced the potential sentence for WikiLeaks suspect Bradley Manning by 112 days because of his harsh treatment at a military jail, where he was held in isolation despite advice from psychiatrists. Judge Denise Lind said the US Army private’s detention conditions were “excessive” and at times illegal, going beyond what was needed to ensure his safety and prevent the risk of suicide. But the judge rejected a request by defence lawyers to dismiss all charges against Manning because of his nine-month detention at the US Marine Corps prison in Quantico, Virginia. The ruling paves the way for a trial in March in which the army private is accused of “aiding the enemy” by passing a trove of secret government files to the WikiLeaks website. Defence attorney David Coombs had argued the court should drop all charges against Manning on the grounds that he suffered illegal punishment at the Quantico jail, where he was held in a solitary cell 23 hours a day, kept under a strict suicide watch and often ordered to strip naked. Prosecutors had said strict measures were necessary because Manning posed a suicide risk. The judge concluded that the government had to ensure Manning did not take his life given his mental health history, as he had reported suicidal thoughts while detained in Kuwait. “Preventing a detainee suicide is in the legitimate interest of the government,” she said. But she ruled prison authorities at Quantico should not have kept Manning under a “rigorous” super-strict suicide watch regime after military psychiatrists advised he was not suicidal. Prison officers had no reason to take away Manning’s underwear at one point as “no new threat” had emerged and it was “no longer reasonable to withhold the underwear,” she said. She cited a seven-day period in which Manning was assessed by psychiatrists as “no longer at risk” of suicide but was kept under strict isolation, saying it constituted “unlawful pretrial punishment.” If convicted on 22 charges, Manning would receive credit for his time behind bars in Quantico, with his potential sentence reduced by 112 days, Lind said. But the judge was not ready to call off the trial over Manning’s treatment at the Quantico jail as “the charges are serious in this case,” she said. The 25-year-old private faces a slew of charges, including “aiding the enemy,” for allegedly leaking hundreds of thousands of sensitive US military and diplomatic documents to Julian Assange’s anti-secrecy site WikiLeaks. He was arrested in May 2010 while serving as an intelligence analyst near Baghdad and subsequently charged over the largest leak of restricted documents in American history. Manning was sent briefly to a US jail in neighbouring Kuwait, before being transferred to the Marine Corps jail in Quantico, Virginia in July 2010. After nine months in the brig, he was moved in April 2011 to a US Army prison at Fort Leavenworth, Kansas, where he was allowed to interact with other detainees as detention conditions were eased. If convicted, Manning could spend the rest of his life behind bars. Before the ruling, the defence and prosecution clashed over whether the court should permit evidence in the trial on Manning’s motive in leaking the classified files. In leaking secret documents, Manning “selected information that could not be used to the harm of the United States or any foreign country,” Coombs, the defence lawyer, told the court. Coombs portrayed his client as a whistle-blower who was trying to inform the public instead of “aiding the enemy” as he is charged. But prosecutors told the judge Manning’s motives for the leak, the largest in US history, were irrelevant. “The accused knew that he was dealing directly or indirectly with an enemy of the United States,” prosecutor Captain Angel Overgaard said. “He knew that the information would be published on the Internet and was accessible to the enemy,” Overgaard said. Coombs has argued that the case against Manning is virtually unprecedented as usually US authorities prosecute soldiers or government employees who pass secrets directly to an adversary – and not those who leak information to a media outlet or website.