Profile: Bradley Manning
US Pte First Class Bradley Manning lip-synced to Lady Gaga while he downloaded thousands of classified documents from military servers, according to a computer hacker he befriended.
Now, the 23-year-old soldier is facing life in prison.
As an intelligence analyst in the US Army, Pte Manning was given access to a large amount of highly sensitive information.
But as a private first class, he was very low-ranking with a relatively meagre wage.
According to his friends, he had become frustrated with a military career that appeared to be stagnating.
And his personal life appears to have hit a downward spiral after he was posted to Iraq in 2009.
Pte Manning joined the army in 2007 after drifting through low-paid jobs.
He had been brought up in Crescent, a small town in Oklahoma. His father, Brian, had reportedly spent five years in the military.
But his parents divorced when he was a teenager, and he moved with his mother to Haverfordwest in south-west Wales.
His journey has inspired a dramatisation of his early years there, staged by the National Theatre Wales, due to tour in March and April 2012.'Funny little character'
Accounts emerging in the media in the UK and US portray his teenage years as difficult.
He was said to have been a hothead who was often teased for being a geek.
"He would get upset, slam books on the desk if people wouldn't listen to him or understand his point of view," a classmate from Oklahoma, Chera Moore, told the New York Times.
A friend from his schooldays in Wales, James Kirkpatrick, told the BBC he was a "funny little character, really on the ball" who was obsessed with computers.
End Quote Bradley Manning Facebook message
Bradley Manning is beyond frustrated with people and society at large”
Some reports say he had a difficult time in Wales, and suffered abuse for being gay.
After finishing school, he returned to the US and joined the army. Friends say he enlisted to help pay for college.
"Obviously the [US] Army has got very good technology and good training for computers so I can see why he may have joined it, but you never would have expected him to do so," said Mr Kirkpatrick.
He went to Iraq in October 2009. But messages he posted on Facebook suggest he was far from happy.
He wrote in early May 2009 on the site that he was "beyond frustrated with people and society at large".
Other status updates followed, among them: "Bradley Manning is not a piece of equipment."
- Website with a reputation for publishing sensitive material
- Run by Julian Assange, an Australian with a background in computer network hacking
- Released 77,000 secret US records of US military incidents about the war in Afghanistan and 400,000 similar documents on Iraq
- Also posted video showing US helicopter killing 12 people - including two journalists - in Baghdad in 2007
- Other controversial postings include screenshots of the e-mail inbox and address book of US vice-presidential candidate Sarah Palin
A week earlier, he had written: "Bradley Manning is now left with the sinking feeling that he doesn't have anything left."
Some of the postings appear to refer to a recent breakdown of a relationship.
But weeks later his words appeared prophetic when he was arrested by military investigators on suspicion of stealing secret information.
Self-confessed computer hacker Adrian Lamo told the world's media how Pte Manning had confessed to the data theft during conversations they had on the internet.
"Listened and lip-synced to Lady Gaga's Telephone while exfiltrating possibly the largest data spillage in American history," Pte Manning wrote, according to a transcript of their messages published on Wired's website.
"Weak servers, weak logging, weak physical security, weak counter-intelligence, inattentive signal analysis… a perfect storm."
Mr Lamo says he went to the authorities with the messages.'Prime suspect'
On 5 July 2010, the private was charged with several offences relating to stealing secret information.
He was accused of handing Wikileaks video footage of an Apache helicopter killing 12 civilians in Baghdad in 2007.
At the end of July, shortly after Wikileaks had released tens of thousands of documents relating to the Afghan war, the US military refused to be drawn on whether Pte Manning was a suspect in a wider investigation.
The website has since disclosed thousands of sensitive messages written by US diplomats and military records from the Iraq war, causing growing embarrassment to the US government.
Pte Manning has been widely named as the prime suspect, and in March 2011, the US Army charged him with 22 extra counts relating to the unauthorised possession and distribution of more than 720,000 secret diplomatic and military documents.
On 12 January 2012 an investigating officer recommended Pte Manning face a military trial.
The recommendation followed a preliminary hearing known as an Article 32 hearing, which is to determine whether the accused should stand trial. The hearing offered Pte Manning's defence team their first opportunity to argue his case.Transfer
One charge, aiding the enemy, is a capital crime, although prosecutors have said they will not seek the death penalty.
Friends and supporters of Pte Manning have launched a campaign to have him released, arguing that the leaks were justified, and his supporters say he has been poorly treated in prison, held in solitary confinement and frequently forced to strip naked.
State department spokesman PJ Crowley resigned after publicly criticising the detention conditions of Pte Manning, and British politicians have also spoken out on the subject.
The Council of Europe and Amnesty International also expressed concerns about his treatment.
In April 2011, defence officials decided to move him from a Marine Corps prison in Virginia to a newly built pre-trial military jail at Fort Leavenworth in the Mid-western US state of Kansas.
That detention facility, they said, is better equipped to handle long-term pre-trial stays, and has better mental health support.
They denied the move was a criticism of his treatment in Virginia.Article 32
Given the severity of the charges, Pte Manning retained a civilian lawyer with an Army Reserve background, David Coombs, who has tried more than 130 military cases.
The Bradley Manning Support Network told CNN they have paid for about $150,000 (£97,000) in expenses towards his defence, mostly through small donations.
The first part of Pte Manning's trial began on 16 December 2011 at Fort Meade, Maryland.
He sat in court quietly listening on his first day, briskly answering routine questions about his rights and his lawyer.
The hearing began with legal wrangling, with the investigating officer in the hearing - similar to a civilian judge - ultimately rejecting a defence request to recuse himself.
Officials say Fort Meade was chosen because its military court is one of the largest in the Washington area.
But the base is also the home of the National Security Agency, the high-security codebreaking and intelligence service.
For a man accused of the largest leak of official secrets in modern times, the location could hardly be more apt.