Bradley Manning, right, departs the courthouse at Fort Meade, Md., on July 30. (GARY CAMERON/Reuters)

Pfc. Bradley Manning was experiencing an intense personal crisis and deteriorating mental health in the months he was leaking large amounts of classified data to the anti-secrecy group WikiLeaks, and he should not have been kept in a war zone, his attorney argued at a court-martial Tuesday.

In April 2010, while serving as an Army intelligence analyst in Baghdad, Manning sent an e-mail to Master Sgt. Paul Adkins, his superior, to tell him that he was suffering from a gender-identity disorder. Manning attached a photograph of himself wearing a blond wig and makeup.

“I have had signs of it for a very long time. It’s caused problems within my family,” Manning wrote in the e-mail with the subject line “My Problem,” which was released Tuesday for the first time. “I thought enlisting in the military would get rid of it. . . . I’ve been trying very, very hard to get rid of it. It’s haunting me more and more as I get older. Now the consequences are getting harder.”

Manning was convicted last month of multiple charges relating to the leaking of classified material, including violations of the Espionage Act. The court-martial is in the sentencing phase, and Manning’s defense team hopes to persuade a military judge not to impose the maximum 90-year sentence on the 25-year-old.

The defense hopes to show that Manning was on the verge of a breakdown leading up to the disclosure of hundreds of thousands of secret military and diplomatic documents, and that his commanders did not help him or remove him from Iraq.

Adkins said he did not inform his superiors about the e-mail until after Manning was arrested. “I really didn’t think at the time that having a picture floating around of one of my soldiers in drag as in the best interest of the intel mission,” Adkins told the court.

The month after he sent the e-mail, Manning was found in the fetal position in a storeroom with a knife at his feet. Adkins testified Tuesday that he found Manning unresponsive but was able to get him to talk about how he felt “fragmented.”

Within an hour, Adkins said, he escorted Manning to his workstation so he could complete his shift. When he finished work, Manning got involved in an altercation with another person at the forward operating base, Adkins testified.

When defense attorney David Coombs pressed Adkins on why Manning was not removed, the sergeant responded that the unit was experiencing “manpower allocation” issues and that the analyst’s skills were essential to the mission.

“My intent was to make sure, if I could possibly do it, that he could maintain his functionality as an intelligence analyst,” Adkins said. “In a perfect world, I think if I could have left him back to make sure he was getting behavior health care, I think I would have.”

The sentencing phase will continue Wednesday, when Manning is expected to make a statement before the judge, Col. Denise Lind.