Pfc. Bradley Manning, who orchestrated the largest leak of classified information in U.S. history, has apologized for hurting the U.S. when he took the stand during his sentencing hearing on Wednesday.

He reportedly told the court: “The last few years have been a learning experience,” adding that he should have worked more “inside the system.”

The way he passed 700,000 military and diplomatic documents to WikiLeaks without first working to change what he saw as government abuse from the inside led former senior U.S. intelligence analyst Joshua Foust to describe his leak as “lazy.”

Last month the 25-year-old was charged with 19 counts, including seven counts of violating the espionage act, for leaking the doucments to “spark a domestic debate on the role of our military and foreign policy in general.”

The documents included videos of airstrikes that killed civilians, a trove of front-line incident reports from the Afghanistan and Iraq wars, dossiers on Guantánamo Bay detainees, and about 250,000 U.S. diplomatic cables.

The disclosures led to some troubling revelations about U.S. actions, and journalists subsequently wrote stories based on the information.

In all, Manning faces a maximum sentence of 90 in prison, but his actual sentence will likely be shorter given the judge’s discretion as well as time taken off for harsh pretrial confinement.

In June his defence attorney David Coombs described Manning as a ”young, naive, but good-intentioned” soldier whose struggle to fit in as a gay man in the military made him feel he ”needed to do something to make a difference in this world.”

Business Insider Emails & Alerts

Site highlights each day to your inbox.

Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.