Convicted leaker Army Pfc. Bradley Manning acknowledged Wednesday that by leaking tens of thousands of pages of classified documents he "hurt people and hurt the United States."
"I understood what I was doing was wrong but I didn't appreciate the broader effects of my actions," he said during his sentencing hearing at Maryland's Fort Meade. "I only wanted to help people, not hurt people."
The former Army intelligence analyst was convicted in July of stealing and disseminating 750,000 pages of documents and videos to WikiLeaks in what has been described as the largest leak of classified material in U.S. history. He was found guilty of 20 of the 22 charges against him, including violations of the U.S. Espionage Act.
WikiLeaks founder Julian Assange took the military court to task, saying it was out to humiliate Manning.
"Mr. Manning's forced decision to apologise to the US government in the hope of shaving a decade or more off his sentence must be regarded with compassion and understanding," a statement from Assange, now holed up in the Ecuador's embassy in London, said. "Mr. Manning's apology is a statement extorted from him under the overbearing weight of the United States military justice system."
How many years Manning spends behind bars is up to Col. Denise Lind, the judge in the case. She already found him not guilty of the most serious charge -- aiding the enemy -- and she later granted a defense motion that decreased the maximum penalty Manning faced from 136 years in prison to 90 years.
Manning has claimed he leaked the material to expose wrongdoing and provoke discussion about U.S. military and diplomatic affairs.
But in court on Wednesday, he told the judge that he now recognized he should have handled it a different way. "I should have worked more aggressively within the system," he said.
Manning also said at the time he decided to leak the documents, he was "dealing with a lot of issues" -- a reference to his gender identity crisis that the defense has made a focal point in the case.
But he told the judge it was not an excuse for what he did. While Manning said he recognized that he has to pay a price for what for he did, he told the judge that he hoped someday to get out of prison and lead a productive life.
His statement followed testimony from a military psychologist, who said Manning appeared to be isolated and under intense pressure as a male soldier struggling with gender identity issues.
"There would never be a time that he could be openly female," Capt. Michael Worsley testified. "And so seeking treatment for that, treatment was how to adjust to that, not treat the disorder, but how to be comfortable with that in the Army."
With much of the testimony in Manning's sentencing hearing focusing on his gender identify issues, the Army on Wednesday released a full version of an e-mail he had sent to his sergeant titled "My Problem."
While Manning does not specifically identify the problem he was referring to, the e-mail includes an image of him wearing a long blond wig and makeup.
"It's not going away, its haunting me more and more as I get older," he wrote in the e-mail. "Now, the consequences of it are dire, at a time when it's causing me great pain in itself. As a result, I'm not sure what to do about it."
Manning's sister, Casey Major, and his aunt, Debra Van Alstyne, asked for leniency in sentencing after providing the court with an intimate look at his upbringing, which they said was characterized by absentee, alcoholic parents.
But the prosecution has offered a picture of a calculating Manning whose behavior was reckless, saying he put the lives of soldiers and civilians in danger.
During the court-martial, prosecution witnesses testified Manning downloaded and leaked 400,000 Pentagon field reports from Iraq and 90,0000 similar documents from Afghanistan. There evidence also presented that he downloaded and leaked more than 250,000 State Department cables.
The release of the classified material elevated what was once a virtually unknown WikiLeaks to a globally recognized name.
Outside the courtroom, Manning's civilian attorney, David Coombs, said he hoped the judge would see that "Bradley is certainly a person who had his heart in the right place."
Earlier in the case, Manning testified about his treatment by the Marines at Quantico Brig in Virginia. The judge ruled that the Marines' harsh treatment of Manning was out of line and granted him 112 days off his eventual sentence.
Later, before the start of his court-martial, Manning read a detailed statement after entering guilty pleas on 10 lesser charges in hopes the prosecution would pursue fewer of the charges against him. It didn't work.