The military judge shows leniency in sentencing Army Pfc. Bradley Manning, who had faced up to 90 years in prison. He could be eligible for parole within seven years.

Bradley Manning is escorted from court at Ft. Meade, Md., after his sentencing.… (Shawn Thew / European Pressphoto…)

FT. MEADE, Md. — Army Pfc. Bradley Manning, the junior intelligence analyst who came to signify a new era of massive security breaches in the Internet age, was sentenced Wednesday to 35 years in prison for leaking a vast trove of military and diplomatic secrets to WikiLeaks. He could be eligible for release in seven years.

So ended a high-profile case that sparked a heated debate about whether the Obama administration is prosecuting whistle-blowers rather than protecting them, a dispute fueled by a flood of recent disclosures documenting the secret surveillance of Americans' telephone and Internet data.

In his crisp Army dress uniform and wire-rim glasses, Manning stood rigidly at attention and showed no emotion as the judge, Army Col. Denise Lind, read the sentence in a brief hearing.

Manning, who said he leaked the documents to protest U.S. foreign policy, had faced up to 90 years in prison. The far lighter sentence appeared to be a rebuke to the government. Prosecutors had urged Lind to imprison him for at least 60 years for orchestrating the largest unauthorized disclosure of classified material in U.S. history and to serve as a warning to others.

It also appeared to be a relief for Manning, who last week apologized in court for having "hurt the United States" and nervously asked the judge for a chance to someday rebuild his life. The sentence enthused many of his supporters, who have contributed $1.4 million for his defense and pledged more to support his legal appeals.

Lind did not explain the sentence. She also demoted Manning to private, took away his Army pay and ordered him dishonorably discharged. He will receive a credit of 1,294 days of confinement so far, including 112 days for the harsh treatment he received at the Marine Corps brig in Quantico, Va.

His lawyers said that with good behavior and the time served, he could apply for parole in less than seven years, although his release that soon is far from assured.

After the hearing, Manning's lead defense attorney, David Coombs, told reporters that the defense team met briefly in a holding area with Manning after he was sentenced. Coombs said some of the lawyers were in tears.

But Manning appeared hopeful, he said, and comforted them.

"He said, 'It's OK. It's all right. Don't worry about it,'" Coombs said. "'It's going to be OK. I'm going to be OK. I'm going to get through this.'"

Coombs said he planned to file a petition next week to seek a commutation of Manning's sentence or a pardon from the White House.

In a statement that Manning wrote to accompany the petition, he said he decided to divulge government secrets "out of love for my country." Manning also compares post-Sept. 11 abuses in the United States to other historical incidents, such as the Trail of Tears forced removal of the Cherokee people in the 1830s, the Supreme Court's Dred Scott case decision in 1857 that African Americans had no standing to sue in U.S. courts, and the forced internment of more than 100,000 people of Japanese ancestry during World War II.

Asked about a possible pardon, a White House spokesman, Josh Earnest, said any appeal for clemency by Manning or his lawyers would be considered "like any other application."

Supporters vowed to rally outside the White House to protest the sentence and to call for a presidential pardon. Other rallies on Manning's behalf were planned as far away as Los Angeles.

Manning is expected to serve his term at the military prison at Ft. Leavenworth in Kansas.

Prosecutors, led by Army Maj. Ashden Fein, declined to comment Wednesday.

Manning was a 22-year-old junior intelligence analyst at a forward operating base outside Baghdad in early 2010 when he began to illegally copy military field reports from Iraq and Afghanistan, detainee assessments from the U.S. military prison at Guantanamo Bay, Cuba, and an enormous cache of diplomatic cables from classified computer accounts. He transmitted more than 700,000 documents to the anti-secrecy website WikiLeaks.

Documents later posted on the Internet by WikiLeaks identified informants who had helped the U.S. military, potentially putting their lives at risk. The leaks also revealed the often negative way U.S. diplomats view America's foreign allies, embarrassing the Obama administration.

Manning chose to be tried and sentenced by a military judge, not a jury. Last month, Lind convicted Manning of 20 of 22 charges, including six counts of espionage. But she acquitted him of the most serious charge, aiding the enemy, which might have sent him to prison for life.