The 25-year-old read a brief statement before a military judge who will next week decide whether to sentence him to a full 90 years in prison following his conviction on espionage charges.

The young soldier's apology capped a day of dramatic testimony where the court was shown a photograph of Manning cross-dressing and heard how his illiterate Welsh mother tried to commit suicide when he was a teenager.

Speaking in a quick, nervous voice, Manning said: "I’m sorry that my actions hurt people. I’m sorry that they hurt the United States."

He apologised for "the unintended consequences" of his decision to give around 700,000 military and diplomatic documents to WikiLeaks, the largest intelligence leak in American history.

The question of whether the leak caused actual harm has been the subject of fierce debate, with the government saying it damaged national security while Manning's defenders claim it merely embarrassed American diplomats.

Manning, who was 22 at the time of the leak, said he was "dealing with a lot of issues", a reference to his belief that he should have been born a woman and to the homosexuality he was forced to hide from fellow soldiers.

The court was shown a picture of Manning dressed as his female alter-ego "Breanna", wearing a blonde wig and make up. Manning sent the photograph to a superior while deployed in Iraq but was not removed from duty as a junior intelligence analyst.

"These issues are not an excuse for my actions," Manning told the court, according to reporters watching proceedings. "I understand I must pay a price for my decisions and actions."

His statement came during the sentencing phase of his court martial and next week Col Denise Lind, the judge, is expected to hand down his sentence. Manning was convicted on 20 charges and could face a maximum of 90 years in prison, although Col Lind may opt for a lower sentence.

"I know that I can and will be a better person," he said. "I hope that you can give me the opportunity to prove, not through words, but through conduct, that I am a good person"

His words contrasted with an earlier statement in February, where he said he had a "clear conscience" as he began giving the secret files to WikiLeaks.

Manning chose to make a statement rather than taking the stand, meaning he was spared a cross-examination by prosecutors.

Casey Major, Manning's elder sister, testified on his behalf and described how their Welsh mother, Susan Manning, drank heavily while pregnant.

Mrs Manning, who has since suffered a stroke, is homebound in Haverfordwest, Pembrokeshire, and has not seen her son since visiting him in prison in 2011.

Ms Major said their mother could only write her own name and tried to kill herself with an overdose of alcohol and prescription drugs when Manning was a teenager.

Describing the drive to the hospital, Ms Major said: "My 12-year-old brother had to sit back there and make sure his mother was breathing."

The family was based in Oklahoma until Manning's parents divorced and the court was shown pictures of him as a boy playing with a pet puppy.

The court also heard from Captain Michael Worsley, a clinical psychologist who held counselling sessions Manning for four months while he was deployed in Iraq.

Cpt Worsley described how Manning was under "isolated" and under "incredible pressure" as he wrestled with his gender identity issues.

"Put him in this hyper masculine environment with little support and few coping skills and the pressure would have been difficult to say the least," said Cpt Worsley. "Being in the military and having a gender dignity issue doesn't exactly go hand-in-hand."