After a three-year legal battle and months-long trial, former Army intelligence analyst Bradley Manning was found not guilty today of the most serious charge he faced – aiding the enemy.

Col. Denise Lind, however, found him guilty of five other counts for violating the Espionage Act and five counts of theft.

The judge rejected the government’s argument that Manning, simply by the nature of his training as an Army intelligence officer, had to assume that the information he leaked would likely reach Al-Qaeda operatives. But she ruled that Manning did have reason to believe that the leaks would harm the U.S., even if that was not his intention.

“This is a historic verdict,” says Elizabeth Goitein, co-director of the Liberty and National Security Program at the Brennan Center for Justice at New York University Law School. “Manning is one of very few people ever charged under the Espionage Act prosecutions for leaks to the media. The only other person who was convicted after trial was pardoned. Despite the lack of any evidence that he intended any harm to the United States, Manning faces decades in prison. That’s a very scary precedent.”

The aiding the enemy charge carried a possible life sentence. But even with that out of the way, Manning still faces a maximum sentence of more than 100 years for the guilty verdicts on other charges.

Shortly before his trial began in June, Manning pleaded guilty to some of the lesser charges against him – 10 of 22 charges – saying he took "full responsibility" for providing the secret-spilling site WikiLeaks with a trove of classified and sensitive military and government documents and video. Manning, 25, said in a lengthy statement read to the court that WikiLeaks did not encourage him to provide the organization with information, and that he approached the organization after first attempting to take what he "believed, and still believe[s]... are some of the most significant documents of our time" to The Washington Post, The New York Times and Politico.

His motivation, he said, was to "spark a domestic debate of the role of the military and foreign policy in general" and "cause society to reevaluate the need and even desire to engage in counterterrorism and counterinsurgency operations that ignore their effect on people who live in that environment every day." Manning asserted that he leaked the documents deliberately, knowing the legal repercussions he might face.

Among other offenses, Manning admitted to improperly possessing and storing classified information and willfully communicating the information to an unauthorized party. He pleaded not guilty, however, to 12 charges, including the most serious: aiding the enemy, which carries a possible life sentence in prison. He also denied disseminating any information that he believed could harm U.S. national security, a key component of the prosecution's espionage case against him.

Manning described accessing and gradually leaking military and diplomatic documents while serving at Forward Operating Base Hammer in Iraq in 2009, after becoming disillusioned with the military and realizing that much of what the Army told him – and the public – was false.

Among the data he leaked to WikiLeaks were large databases containing voluminous accounts of military activities in Iraq and Afghanistan, known as CIDNE-I and CIDNE-A.

"I never hid the fact that I downloaded copies of CIDNE-I and CIDNE-A," Manning said in his statement, pointing out that he labeled and stored them "in the open" in his unit's tactical operations center. Nor did he hide that he also downloaded compression software to facilitate the transfer.

He also leaked information about detainees at Guantanamo Bay, unspecified documents from an "intelligence agency," and the State Department's "Net-Centric Diplomacy" database of diplomatic cables.

Once copied, Manning sent the documents securely to WikiLeaks’ online dropbox, often using Tor and other anonymity protocols to mask his identity.

Manning denied that his actions compromised national security. The database of military activities in Iraq and Afghanistan described mostly "historic" events whose intelligence value perished after "48 to 72 hours." The Guantanamo Bay documents had "no useful intelligence" and did not disclose any results of detainee interrogations, he said. The State Department cables were available to "thousands" of people throughout the government, and Washington Post reporter David Finkel had already written about the deadly Apache helicopter attack in 2007, in which civilians were killed, that Manning viewed on video.

Manning said he often found himself frustrated by attempts to get his chain of command to investigate apparent abuses detailed in some of the documents he accessed. "As an analyst, I always want to figure out the truth," he said. He considered the military unresponsive to the helicopter attack video and other "war porn." At Guantanamo, while Manning said he had sympathy for the government's interest in detaining terrorists, "we found ourselves holding an increasing number of individuals indefinitely."

But Manning conceded that he did not "even look at the proper channels" on how the military chain of command could release the sensitive information.

While in Iraq, Manning – alienated from his fellow soldiers – began visiting WikiLeaks IRC channels and conversing about topics ranging from Linux to gay rights. The chats "allowed me to feel connected to others, even when I was alone," soothing the emotional stresses of deployment.

In January 2010, Manning took a brief mid-tour leave from Iraq, during which he grappled with the decision to leak information. While staying with his aunt in Potomac, Md., Manning said he tried to talk to an unnamed Washington Post reporter to interest her in the Iraq and Afghanistan documents, but said she appeared to not take him seriously. He said he left voicemails with the public editor and the news-tips lines of the New York Times, but got no response. He asserted that only after failing to give the documents to mainstream media organizations did he pass them to WikiLeaks.

He began to leak the documents in February 2010, shortly before returning to Iraq. Via Tor at his aunt's house, he uploaded to WikiLeaks a document he composed for the Post about events in Iraq he said he hoped would lift "the fog of war." Although WikiLeaks didn't immediately publish it, Manning said he felt "a sense of accomplishment" when he returned to Iraq.

After he gave WikiLeaks the video of the Apache assault in Baghdad, he heard back from someone in the WikiLeaks IRC channel using the handle "Ox," whom he believed was WikiLeaks founder Julian Assange or Assange's then-second-in-command, "Daniel Schmitt" – the German activist Daniel Domscheit-Berg. Shortly thereafter, Manning encouraged Ox to use a different handle to contact him, "Nathaniel," after the author Nathaniel Frank.

Manning said his ensuing discussions with "Nathaniel" became friendly, enjoyable and long. "I could just be myself, free of any concerns about social labeling in real life," Manning said, his voice catching at times.

"In retrospect, I realize these dynamics were artificial," Manning continued. "They were valued more to me than Nathaniel."

The online interactions seemed to make Manning's relationship with WikiLeaks at once intimate, and remote. But Manning insisted that no one at WikiLeaks ever encouraged him to leak.

"No one associated with the WLO [WikiLeaks Organization] pressured me to give them more information," Manning said. "The decision to give documents to WikiLeaks [was] mine alone."

He said he took "full responsibility" for a decision that will likely land him in prison for the next 20 years – and possibly the rest of his life.

The sentencing phase of his case is scheduled to begin tomorrow.

(With earlier reporting by Spencer Ackerman)