A former computer hacker testified on Tuesday that he led authorities to the suspected source of the biggest leak of classified documents in U.S. history after several days of online chats with Bradass87, an alias for Army intelligence analyst Bradley Manning.

The 24-year-old Manning is charged with downloading thousands of classified or confidential files from the military's Secret Internet Protocol Router Network, or SIPRNet. Those files are thought to have later appeared on WikiLeaks, a whistleblower website.

Former hacker Adrian Lamo said Manning initially contacted him by email in May 2010 and the two began an online conversation about diplomatic cables and military video the Army private allegedly downloaded from the classified network he used as a member of the 10th Mountain Division in Iraq.

Within a day Lamo contacted Timothy Webster, a former Army counterintelligence agent, to seek advice on who to approach about the information he was getting from Manning.

What I saw in the chats appeared to be an admission of acts so egregious that it required that response, Lamo said when questioned about why he had decided to contact military authorities about Manning's conduct.

Lamo's testimony came on the fifth day of a military hearing to determine whether there is sufficient evidence to court-martial Manning for aiding the enemy and other charges in connection with the massive leak of documents. He faces life imprisonment if convicted of the most serious charge.

Military prosecutors have sought to link Manning to WikiLeaks founder Julian Assange, introducing online chat logs that they said appeared to be conversations between Assange and Manning. The logs discussed sending and receiving U.S. government information.

In 2010, WikiLeaks released several hundred thousand U.S. military documents about the wars in Iraq and Afghanistan, as well as thousands of U.S. diplomatic cables.

Manning's defence attorneys have attempted to portray him as an emotionally troubled young man whose behavioural problems should have prompted his superiors to revoke his access to classified information.

Witnesses have said Manning sent an email to his sergeant saying confusion over his gender identity was seriously hurting his life, work and ability to think. Manning had created a female alter-ego online, Breanna Manning, according to testimony at the hearing.

During Lamo's testimony on Tuesday, tension between him and Manning was obvious. Manning, dressed in camouflage fatigues, slouched in his chair at times and at other times stared straight ahead, avoiding eye contact with Lamo.

'TREAT THIS AS A CONFESSION'

Lamo said he confirmed the identity of Bradass87 by becoming friends with Manning on Facebook and by confirming that he had a password and login for the Army's online knowledge portal.

Lamo, who pleaded guilty to the felony hacking of The New York Times' computer system in 2004, acknowledged under cross-examination by Manning's attorney that he is a minister in the Universal Life Church and had told the person in an online chat to treat this as a confession.

They were coming to you for moral and emotional support? defence attorney David Coombs asked.

Perhaps to bond, yes, said Lamo, who acknowledged suffering depression, having drug problems and being diagnosed with Asperger's syndrome, a disorder that makes social interactions difficult.

Computer crimes investigator Patrick Edwards said Lamo gave authorities a removable computer hard drive, a laptop and two thumbdrives with details from his chats with Manning.

Investigator David Shaver said the chat logs from the computers of Manning and Lamo were identical except for occasional network drops that affected one computer and not the other. One set of chat logs had been modified slightly and may have been those leaked to the media, he said.

In other testimony on Tuesday, Manning's supervisor in Iraq testified that she recommended he be disciplined and barred from handling classified information following a spate of violent confrontations, including one in which he punched her in the face.

Former Specialist Jihrleah Showman said she also had recommended that Manning not be deployed to Iraq because of concerns about his behaviour, but her suggestion was not followed and it was unclear whether her assessments had been passed along to the company commander.

(Writing By David Alexander; editing by Mohammad Zargham)