FORT MEADE, Md. (AP) -- Army Pfc. Bradley Manning was sentenced Wednesday 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.
Flanked by his lawyers, Manning, 25, stood at attention in his dress uniform and showed no reaction as military judge Col. Denise Lind announced the punishment without explanation during a brief hearing.
Among the spectators, there was a gasp, and one woman buried her face in her hands.
"I'm shocked. I did not think she would do that," said Manning supporter Jim Holland, of San Diego. "Thirty-five years, my Lord."
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. He was acquitted of the most serious charge, aiding the enemy, an offense that could have meant life in prison without parole.
Manning could have gotten 90 years behind bars. Prosecutors asked for at least 60 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.
He will get credit for the more than three years he has been held but will have to serve at least one-third of his sentence before he is eligible for parole. He was also demoted to private and dishonorably discharged.
After the judge imposed the sentence, guards hurried Manning out of the courtroom as about a half-dozen supporters shouted from the back: "We'll keep fighting for you, Bradley!" and "You're our hero!"
Prosecutors had no immediate comment, while the American Civil Liberties Union, Amnesty International and other activists decried the punishment.
"When a soldier who shared information with the press and public is punished far more harshly than others who tortured prisoners and killed civilians, something is seriously wrong with our justice system," said Ben Wizner, head of the ACLU's speech and technology project.
Gabriel Schoenfeld, a senior fellow at the conservative Hudson Institute think tank and author of the book "Necessary Secrets," welcomed Manning's punishment.
"The sentence is a tragedy for Bradley Manning, but it is one he brought upon himself," he said. "It will certainly serve to bolster deterrence against other potential leakers."
But he also warned that the sentence will ensure that Edward Snowden, the National Security Agency leaker who has taken refuge in Russia, "will do his best never to return to the United States and face a trial and stiff sentence."
Manning digitally copied and released more than 700,000 documents, including Iraq and Afghanistan battlefield reports and State Department cables, while working in 2010 in Iraq.
The Crescent, Okla., native also leaked video of a 2007 Apache helicopter attack in Baghdad that mistakenly killed at least nine people, including a Reuters photographer.
A potentially more explosive leak case unfolded as Manning's court-martial was underway, when 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 during the "don't ask, don't tell" era. Among the evidence was a photo of him in a blond wig and lipstick.
Defense attorney David Coombs argued that Manning had been full of youthful idealism and "really, truly, genuinely believed that this information could make a difference."
Prosecutors showed that al-Qaida used material from the helicopter attack in a propaganda video and that Osama bin Laden presumably read some of the leaked documents. Some of the material was found in bin Laden's hideout after he was killed.
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.
The Obama administration has charged seven people with leaking to the news media, while only three people were prosecuted in all previous administrations combined.
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 defense analyst who leaked the Pentagon Papers in 1971.
The secret history of U.S. involvement in Vietnam was released to The New York Times and other newspapers in a 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.
In a telephone interview after Manning's sentencing, Ellsberg called the soldier "one more casualty of a horrible, wrongful war that he tried to shorten."
"I think his example will always be an inspiration of civil and moral courage to truth tellers in the future," Ellsberg said.
A lawyer for WikiLeaks founder Julian Assange, Michael Ratner, has suggested Manning's conviction could make it easier for federal prosecutors to get an indictment against Assange as a co-conspirator.
But other legal experts said the Australian's status as a foreigner and a publisher make it unlikely he will be indicted.