Twenty-five-year-old former U.S. Army intelligence analyst Bradley Manning was convicted of several charges including espionage for the part he played in giving classified information to the anti-secrecy website Wikileaks. He could face close to 100 years in prison for the offense. At a sentencing hearing Wednesday, a military court heard from the emotional soldier, experts, and family members who said that Manning’s gender identity disorder may have contributed to his release of the confidential documents.

"First, your honor, I want to start off with an apology," Manning told the court. "I am sorry that my actions hurt people. I 'm sorry that they hurt the United States. At the time of my decisions, as you know, I was dealing with a lot of issues, issues that are ongoing and continuing to affect me. Although a considerable difficulty in my life, these issues are not an excuse for my actions."

According to ABC News, a huge part of the testimony — likely attempts to prove mitigating circumstances and reduce his sentence — focused on the young intelligence analyst's upbringing and personal life. Manning’s sister testified that their home growing up was plagued with alcoholism and neglect.

In perhaps the most beneficial testimony for Manning, forensic psychiatrist and Navy Capt. David Moulton said that the young soldier really did think he was helping people.

"He became, I think, very enthralled in this idea that the things he was finding were injustices that he felt he morally needed to right. … [It was] very in line with, I think, his belief system of righting wrongs," Moulton said. "He knew he had an oath to his job as a soldier, but this conflicted to his ideology as well. Manning was under the impression that his leaked information was going to really change how the world views the wars in Afghanistan and Iraq, and future wars, quite frankly.”

A clinical psychologist, Capt. Michael Worsely also testified at the hearing. He said the “hyper-masculine” military environment that Manning was in contributed to his deteriorating mental health. Worsely said that the stress of military life coupled with Manning’s struggles with his gender identity left him in a really serious condition. And, unfortunately, the military offered little to no help for Manning.

"There would never be a time where he would able to be openly female and so seeking treatment for that," Worsley said. "Again, the treatment would be helping you adjust to that. … It's not treating it like a disorder … so that would be difficult to do in the military."

Manning and his attorneys hope that the testimony will be enough to show that the young man was not ill-intentioned, but rather a “person who had his heart in the right place.” Then, he would be able to avoid the maximum sentence of 90 years.

For more on Manning’s sentencing hearing, visit CNN.