FORT MEADE, Md. -- An Army private suspected of sending reams ofclassified documents to the secret-sharing WikiLeaks website wasillegally punished at a Marine Corps brig and should get 112 days cutfrom any prison sentence he receives if convicted, a military judgeruled Tuesday.

Army Col. Denise Lind ruled during a pretrialhearing that authorities went too far in their strict confinement ofPfc. Bradley Manning for nine months in a Marine Corps brig in Quantico,Va., in 2010 and 2011. Manning was confined to a windowless cell 23hours a day, sometimes with no clothing. Brig officials said it was tokeep him from hurting himself or others.

Lind said Manning'sconfinement was "more rigorous than necessary." She added that theconditions "became excessive in relation to legitimate governmentinterests."

Manning faces 22 charges, including aiding the enemy,which carries a maximum sentence of life behind bars. His trial beginsMarch 6.

The 25-year-old intelligence analyst had sought to havethe charges thrown out, arguing the conditions were egregious. Militaryprosecutors had recommended a seven-day sentence reduction, concedingManning was improperly kept for that length of time on highlyrestrictive suicide watch, contrary to a psychiatrist's recommendation.

Lindrejected a defense contention that brig commanders were influenced byhigher-ranking Marine Corps officials at Quantico or the Pentagon.

Manningshowed no reaction as Lind read her decision. He fidgeted when thejudge took the bench to announce her ruling, sometimes tapping his chinor mouth with a pen and frequently glancing at his attorney's notepad,but those movements tapered off during the hour and 45 minutes it tookthe judge to read the lengthy opinion.

Mike McKee, one of about adozen Manning supporters in the courtroom, said he was disappointed. Hecalled the ruling "very conservative," although he said he didn't expectthe charges to be thrown out.

"I don't find it a victory," McKee said. "Credit like that becomes much less valuable if the sentence turns out to be 80 years."

JeffPaterson of the Bradley Manning Support Network, which is fundingManning's defense, said the sentencing credit "doesn't come close tocompensating Bradley" for his harsh treatment.

"The ruling is notstrong enough to give the military pause before mistreating the nextAmerican soldier awaiting trial," Paterson wrote in an email.

Lind ruled on the first day of a scheduled four-day hearing at Fort Meade, near Baltimore.

Thehearing is partly to determine whether Manning's motivation matters.Prosecutors want the judge to bar the defense from producing evidence attrial regarding his motive for allegedly leaking hundreds of thousandsof secret war logs and diplomatic cables. They say motive is irrelevantto whether he leaked intelligence, knowing it would be seen by al-Qaida

Manningallegedly told an online confidant-turned-informant that he leaked thematerial because "I want people to see the truth" and "informationshould be free."

Defense attorney David Coombs said Tuesday thatbarring such evidence would cripple the defense's ability to argue thatManning leaked only information that he believed couldn't hurt theUnited States or help a foreign nation.

Manning has offered totake responsibility for the leaks in a pending plea offer but he stillcould face trial on charges such as aiding the enemy.

TheCrescent, Okla., native is accused of leaking classified Iraq andAfghanistan war logs and more than 250,000 diplomatic cables whileworking as an intelligence analyst in Baghdad in 2009 and 2010. He isalso charged with leaking 2007 video of a U.S. helicopter crew gunningdown 11 men, including a Reuters news photographer and his driver. ThePentagon concluded the troops acted appropriately, having mistaken thecamera equipment for weapons.

Manning supporters consider him awhistleblower whose actions exposed war crimes and helped trigger thepro-democracy Arab Spring uprisings in late 2010.