Bradley Manning, the US Army private who leaked thousands of classified documents, has been convicted of espionage but not of aiding the enemy.

Pte Manning, 25, has been convicted of 20 charges in total, including theft and computer fraud.

He had admitted leaking the documents to anti-secrecy organisation Wikileaks but said he did so to spark a debate on US foreign policy.

The leak is considered the largest ever of secret US government files.

He faces a maximum sentence of up to 136 years. His sentencing hearing is set to begin on Wednesday.

Analysis After a seven-week court martial, Bradley Manning was convicted in less than 10 minutes in a hushed courtroom with several dozen spectators. Judge Colonel Denise Lind handed down her 20 guilty verdicts, count by count, in a staccato tone. But in acquitting him of the most serious charge, aiding the enemy, Judge Lind seems to have disagreed with the prosecution's claim that the 25-year-old soldier had leaked the material with "general evil intent". The aiding the enemy charge was brought under the precedent of a Civil War-era case. In 1863, a Union Army private, Henry Vanderwater, was convicted after leaking a command roster to a Virginia newspaper. He got three months' hard labour. Manning - who faces up to 136 years in prison - is unlikely to get off as lightly. Viewpoints: Manning verdict

In addition to multiple espionage counts, he was also found guilty of five theft charges, two computer fraud charges and multiple military infractions.

The verdict was criticised by Wikileaks founder Julian Assange, who said it represented "dangerous national security extremism".

Speaking from the Ecuadorean embassy in London, Mr Assange said: "This has never been a fair trial.

"Bradley Manning isn't guilty of anything in that he's actually very heroic for demanding government transparency and accountability and exposing the American people and the rest of the world to the crimes committed by the American government," he said.

Media playback is unsupported on your device Media caption Julian Assange: "He is the quintessential whistleblower"

'Justice served'

Pte Manning stood and faced Judge Colonel Denise Lind as she read the decision on Tuesday. She said she would release detailed written findings at a later date.

He appeared not to react during the verdict, but his defence lawyer, David Coombs, smiled faintly as the not guilty charge on aiding the enemy was read.

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

A guilty verdict on the aiding the enemy charge could have had serious implications for people leaking documents in the future, says the BBC's North America editor, Mark Mardell.

"The government's pursuit of the 'aiding the enemy' charge was a serious overreach of the law, not least because there was no credible evidence of Manning's intent to harm the USA by releasing classified information to WikiLeaks," Amnesty International said in a statement.

The charges Guilty: Seven out of eight espionage charges, five theft charges, two computer fraud charges, five military counts of violating a lawful general regulation, one of wanton publication of intelligence on the internet Not guilty: Aiding the enemy, unauthorised possession of information relating to national defence

But the Democratic and Republican leaders of the US House of Representatives intelligence committee said "justice has been served", in a joint statement after the ruling.

"Manning harmed our national security, violated the public's trust, and now stands convicted of multiple serious crimes," Chairman Mike Rogers, a Republican, and senior Democrat Dutch Ruppersberger, said.

Among the items sent to Wikileaks by Pte Manning was graphic footage of an Apache helicopter attack in 2007 that killed a dozen people in the Iraqi capital Baghdad, including a Reuters photographer.

The documents also included 470,000 Iraq and Afghanistan battlefield reports and 250,000 secure state department cables between Washington and embassies around the world.

Pte Manning, an intelligence analyst, was arrested in Iraq in May 2010. He spent weeks in a cell at Camp Arifjan, a US Army installation in Kuwait, before being transferred to the US.

During the court martial, prosecutors said Pte Manning systematically harvested hundreds of thousands of classified documents in order to gain notoriety.

With his training as an intelligence analyst, Pte Manning should have known the leaked documents would become available to al-Qaeda operatives, they argued.

The defence characterised him as a naive and young soldier who had become disillusioned during his time in Iraq.

Media playback is unsupported on your device Media caption Widney Brown, Amnesty International: Pte Manning never had "any intent to harm the US government"

His actions, Mr Coombs argued, were those of a whistle-blower.

In a lengthy statement during a pre-trial hearing in February, Pte Manning said he had leaked the files in order to spark a public debate about US foreign policy and the military.

Much of the court martial was spent considering the soldier's intentions as he leaked the documents.

His supporters rallied outside the court in Fort Meade and said they were planning to march to the White House on Tuesday evening.