He is a bookish loner – a soldier who did not like going to the firing range. Coworkers remember him as quiet and inoffensive, yet he had problems with job performance and may have posted inflammatory comments on the Web using the screen name "NidalHasan."

Then, at some point, for some reason, Maj. Nidal Malik Hasan snapped, and he became an all-too-common American archetype: the disturbed single gunman who carries out a mass shooting.

Mr. Obama said he had ordered flags at the White House and other federal agencies to be flown at half-staff as a tribute to those who lost their lives. He also said it is important for the US to not jump to conclusions, and to carefully investigate the tragedy at Fort Hood in Texas.

On Friday morning, more information began to emerge about Army Major Hasan and his rampage, but the picture of him portrayed by authorities so far remains a shadowy one, filled with contradictions.

The most basic contradiction may be this: Trained as a psychiatrist to help soldiers overcome the effects of violence, he perpetrated violence himself.

"I'm not aware of any problems here," said Col. Steven Braverman, the hospital commander at Fort Hood. "We had no problems with his job performance."

On Friday, FBI agents searched Hasan's apartment near the base for clues as to what might have led to a shooting that left 13 dead and 30 wounded. They seized his computer and sifted through materials left in his vehicle.

A neighbor of Hasan's told the Associated Press that the major cleaned out his apartment Wednesday morning and told her he would be deployed on Friday.

The neighbor, Patricia Villa, said he gave her some frozen broccoli, shelves, and new Koran, among other things. Then he offered her $60 to give his place a final clean-out on Friday, supposedly after he would have left.

Meanwhile, some soldiers who witnessed the shooting on Thursday said Hasan shouted "Allahu Akbar," an Arabic phrase meaning "God is Great," as he opened fire.

Fort Hood base commander Lt. Gen. Robert Cone said officials had not yet been able to confirm that Hasan had in fact shouted those words. Hasan himself was wounded in the rampage, shot multiple times by a responding policewoman. He remained hospitalized on a ventilator. Authorities have yet to speak with him in any detail.

An imam from a mosque that Hasan regularly attended said he had seen no sign of extremist behavior from the Army psychiatrist, and that in fact Hasan would wear his Army uniform to prayers, according to Associated Press.

According to numerous reports, the FBI had been investigating inflammatory comments on the Internet made by someone with the screen name "NidalHasan." Among other things, the comments compared suicide bombers in the Middle East with the Japanese kamikaze pilots of World War II, saying both were just soldiers doing their duty.

Hasan's family is Palestinian in origin but now has deep roots in the Roanoke area of Virginia, where they ran a number of well-known restaurants. His mother died some years ago, and his father in 1998.

His father is said to have been proud of his son Nidal, who had been the bookish one in the family. When Nidal enrolled in the Army after high school, his parents objected.

Hasan attended college while in the Army. He graduated from Virginia Tech in 1995. The worst mass shooting in US history took place at Virginia Tech's campus in 2007.

Hasan's job performance at Walter Reed was not stellar, according to AP. He had difficulties that required counseling and extra supervision, his former training director, Dr. Thomas Greiger, told AP.

The sheer scale of the Fort Hood shooting, in which Hasan carried at least two pistols and used up many rounds of ammunition, points to premeditation.

In the Army, Hasan had been harassed for being Muslim, said his aunt.

"Some people can take it and some people cannot," she said. "He had listened to all of that and he wanted out of the military," she said.