FORT MEADE, Md. (AP) — U.S. Army Pfc. Bradley Manning was acquitted of aiding the enemy — the most serious charge he faced — but was convicted of espionage, theft and other charges Tuesday, more than three years after he spilled secrets to WikiLeaks.

The judge, Army Col. Denise Lind, deliberated for about 16 hours over three days before reaching her decision in a case that drew worldwide attention as supporters hailed Manning as a whistleblower. The U.S. government called him an anarchist computer hacker and attention-seeking traitor.

Manning stood at attention, flanked by his attorneys, as the judge read her verdicts. He appeared not to react, though his attorney, David Coombs, smiled faintly when he heard not guilty on aiding the enemy, which carried a potential life sentence.

When the judge was done, Coombs put his hand on Manning's back and whispered something to him, eliciting a slight smile on the soldier's face.

Manning was convicted on 19 of 21 charges, and he previously pleaded guilty to a charge involving an Icelandic cable. He faces up to 136 years in prison. His sentencing hearing begins Wednesday.

Coombs came outside the court to a round of applause and shouts of "thank you" from a few dozen Manning supporters.

"We won the battle, now we need to go win the war," Coombs said of the sentencing phase. "Today is a good day, but Bradley is by no means out of the fire."

Supporters thanked him for his work. One slipped him a private note. Others asked questions about verdicts that they didn't understand.

Manning's court-martial was unusual because he acknowledged giving the anti-secrecy website more than 700,000 battlefield reports and diplomatic cables, and video of a 2007 U.S. helicopter attack that killed civilians in Iraq, including a Reuters news photographer and his driver.

In the footage, airmen laughed and called targets "dead bastards." A military investigation found troops mistook the camera equipment for weapons.

Story continues

Besides the aiding the enemy acquittal, Manning was also found not guilty of an espionage charge when the judge found prosecutors had not proved their assertion Manning started giving material to WikiLeaks in late 2009. Manning said he started the leaks in February the following year.

Manning pleaded guilty earlier this year to lesser offenses that could have brought him 20 years behind bars, yet the government continued to pursue all but one of the original, more serious charges.

Manning said during a pre-trial hearing in February he leaked the material to expose the U.S military's "bloodlust" and disregard for human life, and what he considered American diplomatic deceit. He said he chose information he believed would not the harm the United States and he wanted to start a debate on military and foreign policy. He did not testify at his court-martial.

Coombs portrayed Manning as a "young, naive but good-intentioned" soldier who was in emotional turmoil, partly because he was a gay service member at a time when homosexuals were barred from serving openly in the U.S. military.

He said Manning could have sold the information or given it directly to the enemy, but he gave it to WikiLeaks in an attempt to "spark reform" and provoke debate. Counterintelligence witnesses valued the Iraq and Afghanistan war logs at about $5.7 million.

Coombs said Manning had no way of knowing whether al-Qaida would access the secret-spilling website and a 2008 counterintelligence report showed the government itself didn't know much about the site.

The defense attorney also mocked the testimony of a former supervisor who said Manning told her the American flag meant nothing to him and she suspected before they deployed to Iraq that Manning was a spy. Coombs noted she had not written up a report on Manning's alleged disloyalty, though had written ones on him taking too many smoke breaks and drinking too much coffee.

The government said Manning had sophisticated security training and broke signed agreements to protect the secrets. He even had to give a presentation on operational security during his training after he got in trouble for posting a YouTube video about what he was learning.

The lead prosecutor, Maj. Ashden Fein, said Manning knew the material would be seen by al-Qaida, a key point prosecutor needed to prove to get an aiding the enemy conviction. Even Osama bin Laden had some of the digital files at his compound when he was killed.

Some of Manning's supporters attended nearly every day of two-month trial, many of them protesting outside the Fort Meade gates each day before the court-martial. They wore T-shirts with the word "truth" on them, blogged, tweeted and raised money for Manning's defense. One supporter was banned from the trial because the judge said he made online threats.

Hours before the verdict, about two dozen demonstrators gathered outside the gates of the military post, proclaiming their admiration for Manning.

"He wasn't trying to aid the enemy. He was trying to give people the information they need so they can hold their government accountable," said Barbara Bridges, of Baltimore.

On its official Twitter account, WikiLeaks blasted the verdict and the Obama administration, calling it "dangerous national security extremism."

The court-martial unfolded as another low-level intelligence worker, Edward Snowden, revealed U.S. secrets about surveillance programs. Snowden, a civilian employee, told The Guardian his motives were similar to Manning's, but he said his leaks were more selective.

Manning's supporters believed a conviction for aiding the enemy would have a chilling effect on leakers who want to expose wrongdoing by giving information to websites and the media.

Before Snowden, Manning's case was the most high-profile espionage prosecution for the Obama administration, which has been criticized for its crackdown on leakers.

The WikiLeaks case is by far the most voluminous release of classified material in U.S. history. Manning's supporters included Pentagon Papers leaker Daniel Ellsberg, who in the early 1970s spilled a secret Defense Department history of U.S. involvement in Vietnam.

The 7,000 pages of the Pentagon Papers showed that the U.S. government repeatedly misled the public about the Vietnam War.

The material WikiLeaks began publishing in 2010 documented complaints of abuses against Iraqi detainees, a U.S. tally of civilian deaths in Iraq, and America's weak support for the government of Tunisia — a disclosure that Manning supporters said helped trigger the Middle Eastern pro-democracy uprisings known as the Arab Spring.

The Obama administration said the release threatened to expose valuable military and diplomatic sources and strained America's relations with other governments.

Prosecutors said during the trial Manning relied on WikiLeaks and its founder Julian Assange for guidance on what secrets to "harvest" for the organization, starting within weeks of his arrival in Iraq in late 2009.

Federal authorities are looking into whether Assange can be prosecuted. He has been holed up in the Ecuadorean Embassy in London to avoid extradition to Sweden on sex-crimes allegations.