FORT MEADE, Md. — Army Pfc. Bradley Manning's possible sentence for disclosing classified information through WikiLeaks was trimmed from 136 years to 90 years Tuesday by a military judge who said some of his offenses were closely related.

The ruling was largely a victory for defense attorneys, who had argued for an 80-year maximum. Still, the 25-year-old soldier could spend most, if not all, of his remaining years inside a prison at Fort Leavenworth, Kansas.

The sentencing phase of Manning's court-martial is in its second week. He was convicted last week of 20 counts, including six Espionage Act violations, five federal theft counts and a federal computer fraud charge for leaking more than 700,000 documents from a classified government computer network while working as an intelligence analyst in Iraq in 2010.

Manning says he leaked the material to expose wrongdoing by the military and U.S. diplomats. He contends he selectively leaked material that wouldn't harm service members or national security.

At his sentencing hearing, prosecutors are presenting evidence that the leaks damaged U.S. interests. They have focused mainly on the impact of more than 250,000 State Department diplomatic cables that WikiLeaks began publishing in November 2010.