The Army psychiatrist suspected in Thursday's shooting at Fort Hood, Texas, attended morning prayers at a local mosque hours before the rampage that killed 13, the mosque's imam told FoxNews.com.

Imam Syed Ahmed Ali said Major Nidal Malik Hasan usually worn his uniform or civilian clothes to prayers, but on Thursday, he attended in his full robe.

He always was punctual, Ali said, describing Hasan as happy with his life and satisfied with the military — not someone who would carry out such violence.

“It was very wrong, very wrong. Very sad," Ali said. "His behavior was not at all Islam. He hurt all Muslims.”

Interviews with Ali and other worshipers at the mosque, the Islamic Community of Greater Killeen, paint a portrait of a man devoted to his faith and troubled by his impending deployment to Afghanistan to contribute to a war effort he opposed at least partly on religious grounds.

SLIDESHOW: Deadly rampage at Fort Hood Army Base

"He obviously didn’t want to go," said Duane Reasoner, 18, who looked up to Hasan as a sort of religious mentor. "He said he shouldn’t be going to Iraq, and Muslims shouldn’t be in the military — it was an obvious conflict of interest. Muslims shouldn’t be killing Muslims. He told me not to join the military."

Reasoner said he wouldn't condemn Hasan after the shooting spree.

“I don’t know his intentions," Reasoner told FoxNews.com. "I don’t know what he was thinking. I won't condemn another Muslim.”

Soldiers reported that the gunman shouted "Allahu Akbar!" — an Arabic phrase for "God is great!" — before opening fire Thursday, said Lt. Gen. Robert Cone, the post commander. He said officials had not confirmed Hasan made the comment.

Relatives have said Hasan felt harassed because of his Muslim faith but did not embrace extremism. Others were not so sure. A recent classmate said Hasan once gave a jarring presentation to students in which he argued the war on terrorism was a war against Islam, and "made himself a lightning rod for things" when he felt his religious beliefs were challenged.

Reasoner and Hasan went to dinner Wednesday night at a buffet before heading back to the mosque for last prayer. In the past, Reasoner had visited Hasan's apartment, which he described as small and very neat, with not much in it.

Victor Benjamin, 30, who also worships at the mosque, said Hasan was looking for a wife and praying that Allah would send him a good woman.

Reasoner and Benjamin both said they never heard Hasan say anything about having problems with other soldiers because he was Muslim, despite a cousin's claims that Hasan was targeted for harassment.

Ali, the Imam, said Hasan had told him a few weeks ago he was leaving Thursday to spend two or three weeks in Virginia with his family before his deployment.

That trip apparently never happened. Instead, Hasan, wounded in the crossfire, is on a ventilator and accused of carrying out the deadliest shootings ever on a U.S. military base.

The Associated Press contributed to this report.