A military judge has acquitted former US intelligence analyst Bradley Manning of the most serious charge against him, aiding the enemy, but convicted him of espionage, theft and computer fraud charges for giving thousands of classified secrets to the anti-secrecy site WikiLeaks.

He faces up to 136 years in prison.

The judge deliberated for about 16 hours over three days before reaching her decision in a case that drew worldwide attention. Supporters have hailed the 25-year-old Manning as a whistleblower and champion of free-flowing information on the web. The US government has called him an anarchist computer hacker and attention-seeking traitor.

The WikiLeaks case is by far the most voluminous release of classified material in US history. Manning's supporters included Pentagon Papers leaker Daniel Ellsberg, who in the early 1970s spilled a secret Defense Department history of US involvement in Vietnam that showed that the government repeatedly misled the public about the war.

Manning's sentencing begins on Wednesday (tomorrow, NZT). He was convicted on 20 of 22 charges, including a guilty plea the government accepted in February. The charge of aiding the enemy had carried a potential life sentence.

Manning stood at attention as the judge read the verdicts. He appeared not to react, though his attorney, David Coombs, smiled faintly when he heard not guilty on aiding the enemy. When the judge was done, Coombs put his hand on Manning's back and whispered something to him, bringing a slight smile to the soldier's face.

"We won the battle, now we need to go win the war," Coombs, outside court, said of the sentencing phase. "Today is a good day, but Bradley is by no means out of the fire."

Manning's trial was unusual because he acknowledged giving WikiLeaks more than 700,000 battlefield reports and diplomatic cables, plus video of a 2007 US helicopter attack that killed civilians in Iraq and a Reuters news photographer and his driver. In the footage, airmen laughed and called targets "dead bastards".

Manning has said he leaked the material to expose the US military's "bloodlust" and disregard for human life, and what he considered American diplomatic deceit. He said he chose information he believed would not the harm the United States, and he wanted to start a debate on military and foreign policy. He did not testify at his trial.

Manning pleaded guilty earlier this year to lesser offences that could have brought him 20 years behind bars, yet the government continued to pursue the original, more serious charges. Besides the aiding the enemy acquittal, Manning was also found not guilty today of an espionage charge when the judge found prosecutors had not proved their assertion he started giving material to WikiLeaks in late 2009. Manning said he started the leaks in February the following year.

Coombs portrayed Manning as a "young, naive but good-intentioned" soldier who was in emotional turmoil, partly because he was a gay service member at a time when homosexuals were barred from serving openly in the US military.

Coombs said Manning could have sold the information or given it directly to the enemy, but he gave them to WikiLeaks in an attempt to "spark reform" and provoke debate. A counter-intelligence witness valued the Iraq and Afghanistan war logs at about US$5.7 million (NZ$7.14m), based on what foreign intelligence services had paid in the past for similar information.

Coombs said Manning had no way of knowing whether al Qaeda would access the secret-spilling website, and a 2008 counter-intelligence report showed the government itself didn't know much about the site.

The lead prosecutor, Major Ashden Fein, said Manning knew the material would be seen by al Qaeda, a key point prosecutor needed to prove to get an aiding the enemy conviction. Even Osama bin Laden had some of the digital files at his compound in Pakistan when he was killed.

Manning's supporters believed a conviction for aiding the enemy would have a chilling effect on leakers who want to expose wrongdoing by giving information to websites and the media. The Defense Department has made it harder for one person acting alone to download material from a classified network and place it on an unclassified one.

Ellsberg, the Pentagon Papers leaker, said Manning's acquittal on aiding the enemy was more significant than his convictions on the other counts. He said a conviction would mean that most people wouldn't want to risk life imprisonment, or even execution - a permissible penalty under the law - for exposing government secrets.

"American democracy just dodged a bullet, a possibly fatal bullet," Ellsberg said. "I'm talking about the free press that I think is the life's blood of the democracy."

US officials warned of dire consequences in the days immediately after the first WikiLeaks disclosures in July 2010, but a Pentagon assessment determined in August 2010 that the leaks had not compromised intelligence sources or practices, although it said the disclosures could still cause significant damage to US security interests.

The Manning trial unfolded as another low-level intelligence worker, Edward Snowden, revealed US secrets about surveillance programmes. Snowden, a civilian employee, has told The Guardian newspaper his motives were similar to Manning's, but he said his leaks were more selective.

Before Snowden, Manning's case was the most high-profile espionage prosecution for the Obama administration, which has been criticised for its crackdown on leakers. The espionage cases brought since Obama took office are more than in all other presidencies combined.

The material WikiLeaks began publishing in 2010 documented complaints of abuses against Iraqi detainees, a US tally of civilian deaths in Iraq and America's weak support for the government of Tunisia - a disclosure that Manning supporters said helped trigger the Middle Eastern pro-democracy uprisings known as the Arab Spring.

The Obama administration said the release threatened to expose valuable military and diplomatic sources and strained America's relations with other governments.

MANNING CASE TIMELINE

Below is a chronology of some recent events in cases related to disclosure of classified information:July 7, 2010 - Bradley Manning, a private first class in the US Army serving as an intelligence analyst in Baghdad is charged under the military code of justice for turning over documents to WikiLeaks, the first US soldier charged for so broadly releasing classified information.

June 19, 2011 - WikiLeaks' founder Julian Assange, who had encouraged Manning's action, takes refuge in the Ecuadorean embassy in London and asks for asylum in a last-ditch bid to avoid extradition to Sweden over sex crime accusations.February 28, 2013 - Manning pleads guilty to misusing classified material he felt "should become public," but denies the most egregious charge of aiding the enemy. Prosecutors continue with their case, aiming for a conviction on the greater charge, which carries a penalty of life in prison without parole.June 5, 2013 - Britain's Guardian newspaper publishes a secret court order that shows the National Security Agency collecting millions of US telephone records.

June 9, 2103 - In Hong Kong, Edward Snowden, 29, identifies himself as the main source for the Guardian and Washington Post stories on NSA surveillance programmes. The Post quotes him as saying: "It's important to send a message to government that people will not be intimidated."

June 14, 2013 - US authorities charge Snowden with theft of US government property, unauthorised communication of national defence information and willful communication of classified communications intelligence to an unauthorised person - the latter of the two charges falling under the Espionage Act. A warrant is issued for his arrest, though Snowden is not on US soil and is not arrested.July 1, 2013 - Russian President Vladimir Putin says that Snowden, who is holed up in the transit area of a Moscow airport, may stay if he stops "harming our American partners".July 19, 2013 - Assange says he will not leave the sanctuary of the Ecuadorean embassy in London even if Sweden stops pursuing sexual assault claims against him because he fears arrest on the order of the United States, in part for charges related to Manning's leak.