Manning takes stand at pre-trial hearing and speaks at length about his treatment by the military following his arrest in 2010

After 917 days in military captivity, the world finally heard on Thursday from Bradley Manning, the army soldier accused of being the source of the largest leak of government secrets in US history.

In a dramatic opening half-hour of testimony on the third day of the pre-trial hearing at Fort Meade military base in Maryland, Manning spoke at length for the first time about the period after his arrest in May 2010.

Manning detailed the trauma he experienced at the hands of the US military while he was incarcerated for having allegedly handed hundreds of thousands of US diplomatic cables to WikiLeaks.

His defence lawyer, David Coombs, drew a life-sized representation on the courtroom floor of the 6ft by 8ft cell in which Manning was held at the Quantico base in Virginia after he was brought to the US.

Manning seemed initially nervous but relaxed into his subject. He described a breakdown he had in Kuwait in the days after his arrest. "I was in a pretty stressed situation," Manning said. "I had no idea what was going on with anything. I was getting very little information.

"I began to really deteriorate. I was anxious all the time about not knowing anything, days blend into night, night into days. Everything became more insular."

Manning described how his guards stopped taking him out of his cell, preventing any interaction with other detainees. "I didn't have a good understanding of the reasons. Someone tried to explain to me but I was a mess. I was starting to fall apart."

He claimed that two or three times a day his guards would give him a "shakedown". This involved taking him out the cell, then tearing apart everything he had in the cell.

Coombs asked Manning whether he had any recollection of an incident on 30 June 2010, when he had lost control of himself to the extent that doctors had to intervene. "He was screaming, babbling, banging his head against the cell," said Coombs.

Manning replied: "I knew I had just fallen apart, everything is foggy and hazy at that point."

The soldier said he thought he would die in Kuwait. "I remember thinking I'm going to die. I thought I was going to die in a cage," he told the hearing.

A few weeks later, on 29 July, Manning was transferred from Kuwait to Quantico marine base in Virginia. "I had no idea where I was going," said Manning, who thought he might be taken to Germany. "I was very scared, I had no idea."

On board the plane, he was placed in full restraint. "The captain went over the intercom, 'We'll be arriving in Germany'," he said. After an hour and a half on the ground, Manning was put back on the plane. Only when the crew announced they were going to Baltimore did Manning discover he was being returned to the US.

That made him feel better, he said. "I didn't think I would set foot on American soil for a long time."

Coombs told how conditions in Quantico were tough, however. He drew a life-size representation of the cell on the floor of the court, and asked Manning to step into it, to recreate his conditions. Manning told how he could see a reflection of a skylight through a small gap in the cell door if he angled his head in a particular direction.

Earlier, before Manning took the stand, the military judge accepted the terms under which he would enter a guilty plea to seven charges for disseminating classified documents.

Colonel Denise Lind approved the language of the offences to which Manning would admit. She said those carry a total maximum prison term of 16 years.

The Associated Press reported that the judge's ruling on his plea language does not mean that pleas have been formally accepted. That could happen in December.

In the proposal, Manning admits to leaking a battlefield video file, some classified memos, more than 20 Iraq war logs, more than 20 Afghanistan war logs and other classified materials. He would also plead guilty to wrongfully storing classified information.

Manning had made the offer as a way of accepting responsibility for the biggest leak in US military history. Government officials have not said whether they would continue prosecuting him for the other 15 counts he faces, including aiding the enemy, which carries a maximum penalty of life in prison.