Before there was PRISM, there was the largest national security leak in US history.

Right now, a military judge is deliberating the fate of Bradley Manning: a US Army intelligence analyst who confessed to leaking around 700,000 classified diplomatic cables and other secret information about the wars in Iraq and Afghanistan.

After spending more than 1,000 days in prison without trial — with months of that incarceration spent in isolation — Manning eventually had his day in court. A verdict in the trial is expected this week.

Here’s what led to this point, and why his fate still isn’t sealed.

From basic training to a prison bed

In 2007, 22-year-old Bradley Manning joined the US Army. After going through a tumultuous basic training period at Fort Leonard Wood, Missouri, which almost saw him discharged from the military, he eventually completed a second attempt at basic training in 2008. Manning would later move to Arizona, where he received intelligence training and top-secret security clearance.

As The Washington Post reported in a 2011 profile, Manning struggled throughout his early military career, clashing with roommates and other soldiers. His idealism about military values was challenged by his actual experience in the service. In 2009, Manning was deployed to Iraq, despite warnings from some superiors who said that "he was a risk to himself and possibly others." Serving in a forward operating base 40 miles from Baghdad, Manning had access to secure systems as part of his job sifting through intelligence to identify local threats.

Manning's confidence in the Army was shaken in Iraq

Manning’s confidence in the army and the Iraq war was shaken during his deployment. In messages sent to ex-hacker Adrian Lamo, Manning described a particularly disturbing event — one that made him "rethink the world more than anything" — in which a superior allegedly ignored his analysis of "anti-Iraqi literature" in order to detain innocent Iraqis who had merely printed a scholarly critique of the prime minister. According to Raf Sanchez of The Daily Telegraph, Manning said, "I wanted the American public to know that not everyone in Iraq and Afghanistan was a target that needed to be engaged and neutralized."

It was in Baghdad that Manning allegedly contacted WikiLeaks founder Julian Assange for the first time, after WikiLeaks published a trove of pager messages sent on September 11th, 2001. In a personal statement read in trial, Manning says he first approached The Washington Post and The New York Times, but never received a response; he says neither publication took him seriously.

Manning's efforts reached the public in 2010

Manning’s efforts reached the public on April 5th, 2010, when WikiLeaks released a 2007 video it called "Collateral Murder." The video showed a camera feed from a US Apache helicopter as it fired on a group of people in Baghdad. The attack killed a dozen people, including a Reuters cameraman and his driver.

On May 22nd 2010, Adrian Lamo gave up Manning to authorities. On May 27th, Manning was arrested in Iraq. He returned to the US two months later, and was formally charged on July 6th, 2010. Manning’s trial would not begin until nearly three years later, on June 3rd, 2013.

The Trial

Manning pleaded guilty in February to 10 lesser charges related to unauthorized access and the dissemination of classified information. Following Manning's pleading guilty to charges that would put him in prison for a maximum of 20 years, the government chose to pursue 22 charges against him. Though he stands accused of "aiding the enemy," a capital offense, prosecutors have said they will not pursue the death penalty, meaning possible life imprisonment. If convicted on all charges, Manning faces life in prison, plus 54 years. Journalist Alexa O'Brien has provided a chart breaking down the possible outcomes of the final verdict.

"He knew the danger of revealing information."

The prosecution argues that the leaked documents eventually ended up in the hands of al-Qaeda, including the hard drives found on Osama bin Laden’s computer in a May 2011 raid. It says that Manning indiscriminately leaked sensitive information to the enemy, that he "knew the danger of revealing information to an organization like WikiLeaks, and he ignored that danger." Manning’s defense attorney, David Coombs, has tried to spin Manning’s actions positively, portraying him as an idealistic young man driven by good intentions and a desire to shed light on secrets that the public needed to see.

It’s an important trial that’s about more than Manning himself. Press and civil liberties advocates have used Manning’s persecution, the negative characterization of WikiLeaks, and the extreme circumstances of secrecy that permitted the private to leak information in the first place as evidence of a culture of government over-classification and immoral punishment of whistleblowers.

As in the courtroom, public opinion is divided along several lines. Some "law and order" opponents claim that Manning should have the book thrown at him because he obviously broke the law. Some acknowledge that he broke the law, but sympathize with his intentions and the moral dimension of his acts — should all of that secret information really have been secret? But despite any public protest one way or another, Manning's fate will be determined by a single military judge.

Manning's Future

After a verdict, Manning’s trial will enter the sentencing phase, in which both sides will again present evidence, including the impact of the leaks, Manning’s performance of duty, and other extenuating circumstances. Then, the defense and prosecution will provide arguments concerning the appropriate sentence. Because Manning chose to be tried by the military judge alone, Colonel Lind will ultimately decide Manning’s sentence.

While The Verge’s Jesse Hicks said that you could be forgiven for forgetting Bradley Manning, his case is more relevant to public discourse than ever, with recent revelations about the NSA’s internet and phone surveillance programs, the government’s aversion to transparency about domestic spying, and a new high-profile whistleblower that some US officials would like to "pursue to the ends of the earth." A verdict in the Manning trial is expected early this week.

Update: According to The Associated Press, a verdict has been reached in the Bradley Manning trial. It'll be announced on Tuesday, July 30th at 1PM ET. Xeni Jardin reports that though the verdict will be announced on Tuesday, the judge planned on continuing deliberations into the evening:

Correction: A previous version of this article stated that Manning had not been charged with a capital offense. "Aiding the enemy" is a capital offense, but prosecutors have said they will not pursue the death penalty. It also said Manning faces 7 charges; he actually faces 22. If convicted on all counts, he faces life in prison plus 154 years, not life in prison, as the previous version stated.