An Army judge on Tuesday acquitted Pfc. Bradley Manning of aiding the enemy by disclosing a trove of secret U.S. government documents but found him guilty of espionage, a mixed verdict that dealt a rebuke to military prosecutors who sought to prove that the largest leak in U.S. history had assisted al-Qaeda.

The judge, Col. Denise Lind, found Manning guilty of most of the more than 20 crimes he was charged with, including several violations of the Espionage Act. He could face a maximum of 136 years in prison.

The case, tried in a small courtroom at Fort Meade, Md., an installation that includes the National Security Agency, unfolded amid a heated national conversation about the right balance between government secrecy and civil liberties — a debate fueled by recent revelations about the scope of U.S. anti-terrorism surveillance programs.

In charging Manning with aiding the enemy, government prosecutors argued that the former intelligence analyst’s decision to release diplomatic cables and battlefield reports amounted to the highest form of treason.

Lind did not buy that argument. But her verdict, which marked the first major espionage conviction during the Obama administration, is certain to set markers in the debate over government secrecy and whistleblower protections.

The verdict for each of Wikileaks source Bradley Manning's charges.

Manning’s attorney, David E. Coombs, said he was pleased by the verdict, but he signaled that the decisive moment will come during the sentencing phase of the court-martial, which opens Wednesday and could last several weeks.

“We won the battle, now we need to go win the war,” Coombs said after leaving court. “Today is a good day, but Bradley is by no means out of the fire.”

Lind also acquitted Manning, 25, of one count of violating the Espionage Act that stemmed from his leak of a video that depicted a deadly U.S. military airstrike in Afghanistan’s Farah province.

Military prosecutors did not speak publicly after the verdict. Some lawmakers said the case served as a reminder that the government must do more to prevent the disclosure of classified information, citing the disclosures about U.S. surveillance programs by former NSA contractor Edward Snowden.

“There is still much work to be done to reduce the ability of criminals like Bradley Manning and Edward Snowden to harm our national security,” said a statement issued by Reps. Mike Rogers (R-Mich.) and C.A. Dutch Ruppersberger (Md.), the chairman and ranking Democrat, respectively, on the House Intelligence Committee.

Legal precedent feared

The eight-week trial at Fort Meade offered a gripping account of Manning’s transformation after he was deployed to Iraq in 2009. Prosecutors asserted that, after being startled by what he came to view as egregious U.S. wartime misconduct, Manning became a mole for the anti-secrecy group WikiLeaks, using his access to classified information to collect more than 700,000 documents that ultimately became public. They ranged from sensitive detainee assessments to diplomatic dispatches, some decades old, that embarrassed their authors and angered their subjects.

Had Manning been convicted of aiding the enemy, he would have faced a sentence of life in prison without the possibility of parole. Prosecutors were relying on a Civil War-era conviction to bolster their case. They argued that Manning should have known that terrorist organizations would have an interest in, and potentially benefit from, the disclosures.

Civil libertarians feared that a conviction on that charge would have set a dangerous precedent.

“The heart of this matter is the level of culpability,” said retired Air Force Col. Morris Davis, a former chief prosecutor for the military commissions at Guantanamo Bay, Cuba. He noted that Manning has already pleaded guilty to some charges and admitted leaking secret documents to WikiLeaks that he felt exposed battlefield misdeeds. “Beyond that is government overreach,” Davis said.

Supporters’ partial relief

Lind made no substantive remarks as she delivered the verdict, and Manning showed no reaction as she did so. A gaggle of Manning supporters who have been following his case expressed partial relief at the outcome.

“I am relieved for Bradley Manning and our country that he was not convicted of the ­aiding-the-enemy charge,” said Nathan Fuller, a member of the Bradley Manning Support Network, which advocates for the defendant. “But I am depressed for Bradley that he still faces decades in jail after being found guilty of all these charges.”

WikiLeaks founder Julian Assange called the verdict “an example of national security extremism.”

“Bradley Manning’s alleged disclosures have exposed war crimes, sparked revolutions and induced democratic reform,” Assange said. The Obama administration, he charged, “is intent on deterring and silencing whistleblowers, intent on weakening freedom of the press.”

Some analysts said that Lind’s rulings lowered the bar for proving charges of aiding the enemy and espionage. While those are not binding on civilian judges, they could be used as guidance in future leak cases.

The high-profile case also put a stark spotlight on the military justice system, which is less transparent than civilian courts and has come under assault by critics who say it is ill-equipped to deal with the military’s rising number of sexual assault cases.

Before sentencing Manning, Lind will spend weeks hearing from defense and prosecution witnesses. The government is expected to provide a classified assessment of the damage created by Manning’s disclosures.

Coombs, meanwhile, is expected to continue to portray his client as a patriot who followed his conscience as the attorney seeks a lenient sentence.

Manning’s aunt released a statement to Britain’s Guardian newspaper expressing gratitude to his legal team and supporters.

“While we are obviously disappointed in today’s verdicts, we are happy that Judge Lind agreed with us that Brad never intended to help America’s enemies in any way,” said the statement, which did not include the aunt’s name. “Brad loves his country and was proud to wear its uniform.”