"He has been an outsider, a social misfit, most of his life," psychologist Jack Norris said of Spc. Ryan G. Anderson.
Norris, of Madigan Army Medical Center, said he began evaluating Anderson in mid-July, eventually diagnosing him with bipolar disorder, also known as manic depression.
He said Anderson has always been socially awkward. "The friends he has had usually revolved around their mutual involvement in some arcane interest," Norris said.
Anderson was videotaped providing military information to federal agents who prosecutors say he thought were al Qaeda agents. Testimony concluded Wednesday with closing arguments set for Thursday.
A second defense expert said Wednesday that Anderson is able to tell right from wrong.
Dr. Russell Hicks, a retired Army colonel and a staff psychiatrist at Madigan, said he had diagnosed Anderson with Asperger's syndrome, a form of autism that impairs cognitive and social functioning.
He said his diagnosis did not conflict with Norris' assessment.
During cross-examination, Norris read an e-mail Anderson wrote about his fellow soldiers.
"I do not hate them but I do not feel at home in their company," Anderson wrote, adding that they were "crude and immoral."
The Army presented a rebuttal witness, Anderson's superior officer, who testified that Anderson whispered, a day before his Feb. 12 arrest, that he had been contacted by al Qaeda.
"They contacted me, sergeant," Sgt. Francisco Velez quoted Anderson as saying Feb. 11 at the Fort Lewis cafeteria.
Velez asked what he meant.
"Al Qaeda," Anderson whispered.
Velez said he noted that others could hear, and suggested he and Anderson go to the base commanders. Prosecutors did not ask Velez if he reported the conversation to his superiors.
Military spokesmen were not available to discuss Velez's testimony.
Anderson, a Muslim convert, is charged with five counts of trying to provide al Qaeda with information about U.S. troop strength and tactics, as well as methods for killing American soldiers. He could face up to life in prison if convicted.