FORT MEADE, Md. -- U.S. soldier Bradley Manning was sentenced Wednesday to 35 years in prison for giving hundreds of thousands of classified military and diplomatic documents to the anti-secrecy group WikiLeaks, the largest such leak in American history.

The military judge didn't offer any explanation for the sentence. Manning stood at attention and appeared not to react.

The closely watched case has seen the 25-year-old called both a whistleblower and a traitor, and it opened a fierce debate on national security and freedom of expression. Manning's prominent supporters have included Daniel Ellsberg, whose sensational leak of the Pentagon papers in the early 1970s exposed U.S. government lies about the Vietnam War.

Manning had faced up to 90 years in prison. Prosecutors had wanted at least a 60-year sentence, saying it would dissuade other soldiers from following in his footsteps. The defence suggested no more than 25 years so that Manning could rebuild his life.

With good behaviour and credit for the more than three years he has been held, Manning could be out in about 6 1/2 years, according to his defence attorney David Coombs. Manning's rank was reduced, he was dishonourably discharged and he forfeited his pay.

Coombs told a press conference at a nearby hotel that early next week he'll file, through the Army, a request that the president pardon the soldier "or at the very least commute" the sentence to time already served.

"The time to end Brad's suffering is now," Coombs said. "The time for our president to focus on protecting whistleblowers instead of punishing them is now."

The White House said that if Manning wants to seek a presidential pardon, he must apply for clemency and his request "will be considered in that process like any other application."

Amnesty International and the Bradley Manning Support Network have announced an online petition asking President Barack Obama to pardon Manning.

White House spokesman Josh Earnest said there was a process for pardons. "I'm not going to get ahead of that process," Earnest said.

Coombs read a statement from the family Wednesday during a news conference that said Manning's intentions were good and he believed he was acting in the best interest of this country. They also thanked his defence team and supporters around the world and said the fight was not over.

Manning's uncle Kevin Fox told BBC television that the soldier shouldn't have been given any time at all and he called him a hero. Fox is Welsh, like Manning's mother, who is reportedly in poor health.

WikiLeaks founder Julian Assange called the sentence a "significant strategic victory" considering that Manning could be free within a decade. But he said "the only just outcome" is Manning's unconditional release.

Guards hurried Manning out of the courtroom, and some supporters shouted: "We'll keep fighting for you, Bradley" and "You're our hero."

Prosecutors did not immediately comment. Defence lawyer David Coombs said he was in tears after the sentence was handed down but that Manning said, "I know you did your best. It's going to be OK."

In an interview after Manning's sentencing, Ellsberg called him "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.

The trial has drawn further attention to the Obama administration's aggressive pursuit of leakers. The administration has charged seven people with leaking to the news media, while only three were prosecuted in all previous presidential administrations combined.

There was no immediate word from Manning's mother in Wales, who was reported to be in poor health, but the soldier's uncle, who is also Welsh, deplored the sentence.

"I hope it will be reduced," Kevin Fox told BBC television. "To be honest, he shouldn't have been given any time at all. In my eyes, he is a hero."

In a statement, the American Civil Liberties Union was critical of the sentence.

"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, director of the ACLU's Speech, Privacy & Technology Project.

Manning leaked more than 700,000 Iraq and Afghanistan battlefield reports and State Department diplomatic cables in 2010 while working as an intelligence analyst in Iraq.

He was convicted last month of 20 offences, including six Espionage Act violations, five theft counts and computer fraud. Prosecutors were unable to prove that he aided the enemy, a crime punishable by life in prison.

Manning has apologized and said he wanted to expose the U.S. military's "bloodlust" and generate debate over the wars and U.S. policy.

"I believed I was going to help people, not hurt people," he said last week.

His defence team said he was under severe mental pressure as a young man struggling with gender identity issues at a time when openly gay people were not allowed to serve in the military. Among the evidence was a photo of him in a blond wig and lipstick.

Prosecutors said the leaks endangered the lives of U.S. intelligence sources and prompted several ambassadors to be recalled, reassigned or expelled. They did not present any evidence in open court that anyone was physically harmed as a direct result of Manning's actions.

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

Gabriel Schoenfeld, a senior fellow at the conservative Hudson Institute think-tank and author of the book "Necessary Secrets," welcomed Manning's punishment but warned that it will ensure that Snowden, who has taken refuge in Russia, "will do his best never to return to the United States and face a trial and stiff sentence."

Prosecutors had requested a far longer prison term for Manning than other soldiers have received in recent decades for sharing government secrets.

Albert T. Sombolay got a 34-year-sentence in 1991 for giving a Jordanian intelligence agent information on the buildup for the first Iraq war, plus other documents and samples of U.S. Army chemical protection equipment. Clayton Lonetree, the only Marine ever convicted of espionage, was given a 30-year sentence, later reduced to 15 years, for giving the Soviet KGB the identities of U.S. CIA agents and the floor plans of the embassies in Moscow and Vienna in the early 1980s.

Amnesty International and the Bradley Manning Support Network have announced an online petition asking President Barack Obama to pardon Manning

Manning will get credit for about 3 1/2 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.