The hacker who alerted federal authorities to the alleged leak of classified documents by Pfc. Bradley E. Manning testified Tuesday that the young Army analyst never indicated any desire to help U.S. adversaries by releasing the material.

“Not in those words, no,” the hacker, Adrian Lamo, responded when asked by Manning’s attorney whether the soldier had said he “wanted to help the enemy.”

Lamo quietly answered questions for half an hour on the second day of Manning’s court-martial at Fort Meade, Md. The testimony focused on the interactions between the two in May 2010, when they communicated through instant messages while Manning was stationed in Iraq. The day after Manning told him he had obtained vast amounts of sensitive government information, Lamo alerted law enforcement authorities.

Manning, 25, is being court-martialed on 22 charges, including a count of aiding the enemy by providing the material to the anti-secrecy group WikiLeaks. In an opening statement, the government prosecutor in the case said Manning had “harvested” a massive trove of classified information and made it available to U.S. enemies knowing he would cause harm.

The government is expected to introduce evidence that al-Qaeda leader Osama bin Laden requested and reviewed a copy of internal U.S. military logs of the war in Afghanistan from another member of the terrorist network.

Army Pfc. Bradley Manning is escorted into a courthouse at Fort Meade, Md., on Tuesday. (Patrick Semansky/AP)

Manning’s attorney, however, has portrayed his client as a naive young man who was troubled by the information he had seen and thought he could “make a difference in this world.”

On Tuesday, the attorney, David Coombs, attempted to draw comparisons between Manning and Lamo, asking whether Lamo saw a bit of himself in Manning. “He told you he wanted to disclose things for public good?” Coombs said. “You saw something familiar that day — a young 20-year-old with good intentions?”

Lamo replied, “That was not lost on me, correct.”

Coombs reviewed some of the chats between his client and Lamo over the course of a week, emphasizing Manning’s isolation. Lamo generally confirmed Coombs’s recitation from the chat logs with a simple yes, or “Yes, he said that,” while Manning sat quietly at the defense table, looking over documents and listening closely to the testimony. His expression did not change when Lamo entered the courtroom.

While stationed in Iraq, Manning decided to turn to Lamo, a former hacker whom he had not met but was aware of in part because he was a well-known hacker.

“I’m an army intelligence analyst, deployed to eastern baghdad, pending discharge for ‘adjustment disorder,’ ” Manning said in one of the messages. “If you had unprecedented access to classified networks 14 hours a day 7 days a week for 8+ months, what would you do?”

In pretrial hearings in 2011, Lamo said he contacted law enforcement officials because “what I saw in the chats appeared to be an admission so egregious that they required a response.”

The prosecutor in the court-martial, Maj. Ashden Fein, questioned Lamo on Tuesday about how he technically communicated with Lamo and which computers Lamo gave investigators to examine. Fein also asked Lamo how he knew no one else had had access to his computer. “Computer geeks don’t always leave the house much,” Lamo said.

The prosecution called six additional witnesses to discuss issues including forensic examination of evidence as well as the training Manning received as an intelligence analyst.

One instructor, Troy Moul, described Manning as studious. “He was always full of questions. It actually got difficult at times to continue with instruction because he was always asking, well, why is this, what if, what’s the meaning behind something to better understand what we were teaching.”