Bradley Manning was sentenced today to 35 years in prison for giving hundreds of thousands of secret military and diplomatic documents to WikiLeaks in one of the nation's biggest leak cases since the Pentagon Papers more than a generation ago.

In a brief hearing at Fort Meade, Md., Col. Denise Lind, a military judge, didn't offer any explanation for the sentence.

The soldier will be dishonorably discharged from the U.S. military and forfeit some of his pay, she said.

The former intelligence analyst was found guilty last month of 20 crimes, including six violations of the Espionage Act, as part of the Obama administration's unprecedented crackdown on media leaks.

But the judge acquitted him of the most serious charge, aiding the enemy, an offence that could have meant life in prison without parole.

Manning digitally copied and released more than 700,000 documents, including Iraq and Afghanistan battlefield reports and U.S. State Department cables, while working in 2010 in Iraq.

He also leaked video of a 2007 Apache helicopter attack in Baghdad that mistakenly killed at least nine people, including a Reuters photographer.

After the sentencing, Manning handed a statement to his lawyer, in which he explained that he had chosen to leak confidential information out of love for his country and concern for the world. "We had forgotten our humanity," wrote Manning.

"Whenever we killed innocent civilians instead of accepting responsibility for our conduct we elected to hide behind the veil of national security."

Defence attorney David Coombs said in a press conference that he would be submitting a request that the U.S. president grant Manning a pardon, or at the very least commute his sentence to time served. "The time to end Brad’s suffering is now," said Coombs.

In his statement, Manning wrote that if he is not pardoned, he would "gladly pay the price" of his sentence in exchange for a free society.

Bradley Manning is escorted to a security vehicle outside a courthouse in Fort Meade, Md., after a hearing in his court martial. Manning has been sentenced to 35 years in prison for leaking a trove of classified information to the anti-secrecy website WikiLeaks. (Patrick Semansky/Reuters)

WikiLeaks said the 35-year jail term was a "strategic victory" as it meant he was eligible for parole in less than nine years.

"Significant strategic victory in Bradley Manning case," WikiLeaks said on its official Twitter feed.

"Bradley Manning now eligible for release in less than 9 years, 4.4 in one calculation."

With good behaviour and credit for the more than three years he has been held, Manning could be out in seven years, Coombs said.

Manning could have been given 90 years behind bars. Prosecutors asked for at least 60 years as a warning to other soldiers, while Manning's lawyer suggested he get no more than 25, because some of the documents he leaked will be declassified by then.

Manning will get credit for about 3½ years of pretrial confinement, including 112 days for being illegally punished by harsh conditions at a Marine Corps brig. His lawyers asserted he was locked up alone for at least 23 hours a day, forced to sleep naked for several nights and required to stand naked at attention one morning.

Nathan Fuller, a member of the Bradley Manning Support Network, said supporters were relieved that Manning didn't get the 90 years he could have.

"But it was a real outrage to see him be sentenced to several decades in prison," Fuller told CBC's As It Happens. "He's a whistleblower – someone that we should be thanking, celebrating, rewarding, and not prosecuting and jailing – and certainly not torturing, as he endured that solitary confinement."

Fuller said Manning was "whisked away" by military police before supporters could even see him react.

NSA leaker Snowden's case unfolds

A potentially more explosive leak case unfolded as Manning's court martial was underway, when former National Security Agency contractor Edward Snowden was charged with espionage for exposing the NSA's internet and telephone surveillance programs.

At his trial, Manning said he gave the material to the secrets-spilling website WikiLeaks to expose the U.S. military's "bloodlust," and generate debate over the wars and U.S. policy.

During the sentencing phase, he apologized for the damage he caused, saying, "When I made these decisions, I believed I was going to help people, not hurt people."

His lawyers also argued that Manning suffered extreme inner turmoil over his gender identity — his feeling that he was a woman trapped in a man's body — while serving in the macho military, which at the time barred gays from serving openly. Among the evidence was a photo of him in a blond wig and lipstick.

Defence attorney Coombs told the judge that Manning had been full of youthful idealism.

"He had pure intentions at the time that he committed his offences," Coombs said. "At that time, Manning really, truly, genuinely believed that this information could make a difference."

Fuller said he believes that the sentence is an attempt to send a "chilling effect" message that demonstrates to future whistleblowers thinking of disclosing secrets that they will face the full weight of U.S. law "and then some."

Witnesses testify of dangers to intelligence sources

Prosecutors did not present any evidence in open court that anyone was physically harmed as a direct result of Manning's actions. But they showed that al-Qaeda used material from the helicopter attack in a propaganda video and that Osama bin Laden presumably read some of the leaked documents, which were published online by WikiLeaks. Some of the material was found in bin Laden's compound when it was raided.

Also, government witnesses testified the leaks endangered U.S. intelligence sources, some of whom were moved to other countries for their safety. And several ambassadors were recalled, expelled or reassigned because of embarrassing disclosures.

Prosecutors called Manning an anarchist and an attention-seeking traitor, while supporters have hailed him as a whistleblower and likened him to Daniel Ellsberg, the defence analyst who in 1971 leaked the Pentagon Papers, a secret history of U.S. involvement in Vietnam, to The New York Times and other newspapers.

That case touched off an epic clash between the Nixon administration and the press and led to a landmark Supreme Court ruling on the First Amendment.

The Obama administration has charged seven people with leaking to the news media, while only three people were prosecuted in all previous administrations combined.

Among those seven is Snowden, whose leak has triggered a fierce debate over security vs. privacy and strained U.S. relations with Russia, which is harboring him despite demands he be returned to the U.S. to face charges.