The US president has honoured the memory of 13 people killed in a shooting attack at the Fort Hood military base in Texas and said their killer "will be met with justice".
Barack Obama attended a memorial service at the army post on Tuesday and condemned the "twisted logic" that led to the gun attack, which also left at least 29 people wounded.
No faith justifies these murderous and craven acts; no just and loving God looks upon them with favour,'' Obama told those gathered at the service.
"And for what he has done, we know that the killer will be met with justice - in this world and the next."
Obama, who was at the service with first lady Michelle Obama, did not mention by name Major Nidal Malik Hasan, an army psychiatrist suspected of carrying out the attack on Thursday.
Kevin Sullivan, who worked for former president George Bush as communications director, said Obama's presence alone would be meaningful to those hurting at the largest US military installation.
"It sends a message that he understands this is a national moment," Sullivan said.
"But what really matters is that the president is able to provide some comfort to the sons and daughters and husbands and wives of the victims.
"That's ultimately why he's going. He's saying, 'The whole country grieves for you."'
US government officials have said that Hasan, who is recovering at a military hospital after being shot by police at the end of the attack, is to be charged in a military court over the shooting.
Hasan was in a coma but has now regained consciousness and has talked to his lawyer.
US officials have said that intelligence agencies first started investigating Hasan last December, reviewing what they believed to be email communications between him and a Muslim cleric in Yemen who was known for his anti-American teachings.
Anwar al-Awlaki served as an imam at a mosque near Washington DC where Hasan worshipped, until 2002.
Federal officials ended the investigation after concluding that Hasan's communications were related to research he needed to work as a psychiatrist at the Walter Reed Medical Centre, situated inside the US base.
But in a blog posting on Monday, al-Awlaki wrote: "Nidal Hasan is a hero. He is a man of conscience who could not bear living the contradiction of being a Muslim and serving in an army that is fighting against his own people.
"In fact the only way a Muslim could Islamically justify serving as a soldier in the US army is if his intention is to follow the footsteps of men like Nidal."
Search for motive
Investigators are trying to establish the motive for the shootings.
|Hasan's family said he was trying to avoid being deployed to Afghanistan
Hasan, who was known to be against the US-led wars in Iraq and Afghanistan, was supposed to be deployed to Afghanistan this month but his family said he was trying to get out of the assignment.
Hasan's family attended the Dar al-Hijrah Islamic Centre in Falls Church, Virginia, where al-Awlaki was preaching in 2001.
The funeral of Hasan's mother was held at the mosque on May 31, 2001, according to her obituary.
That was around the same time two 9/11 suspected hijackers worshipped at the mosque.
Al-Awlaki left the US in 2002, eventually travelling to Yemen, but his whereabouts have not been known since he was released from a Yemeni jail last year.
He is on Yemen's most-wanted list, according to Yemeni security officials.