US President Barack Obama has said "no faith justifies" last week's killings of 13 people at an army base in Texas.
Mr Obama's comments came in an address to a memorial service for the victims of the Fort Hood shootings, after he met relatives of those who died.
Maj Nidal Malik Hasan, who is accused of carrying out the massacre, was shot by police and remains in hospital.
US intelligence authorities have said they knew Maj Hasan had been in contact with a cleric sympathetic to al-Qaeda.
Mr Obama said mourners had come to "pay tribute to 13 men and women who were not able to escape the horror of war, even in the comfort of home".
'Murderous and craven'
The fact that the victims died on American soil made it "even more painful and even more incomprehensible", he said.
The US president told the thousands of people at the service that they had come together "filled with sorrow".
He also praised the bravery of those who had helped victims in the "terrible minutes during the attack".
"It may be hard to comprehend the twisted logic that led to this tragedy, but this much we do know - no faith justifies these murderous and craven acts; no just and loving God looks upon them with favour," he continued.
"And for what he has done, we know that the killer will be met with justice - in this world, and the next."
Also attending the service was Army Chief of Staff George Casey, Defence Secretary Robert Gates, Adm Mike Mullen, chairman of the Joint Chiefs of Staff, and Texas Governor Rick Perry.
Maj Hasan is recovering from gunshot wounds at a military hospital and will be charged in a military court over last Thursday's shootings - he has declined to be interviewed by investigators.
On Monday, the Senate Homeland Security Committee announced it would hold a full investigation into the attacks, starting with a public hearing next week.
Senator Joe Lieberman, who chairs the committee, said the "murderous attack should be examined from every angle to make sure nothing like this occurs again".
He said investigators would seek to determine Maj Hasan's motives and "whether the government missed warning signs that should have led to expulsion, and what lessons we can learn to prevent such future attacks".
Mr Lieberman said the authorities would "do no favour" to Muslims serving in the US army by "ignoring real evidence" that Maj Hasan may have held violent extremist views.
An FBI-led task force monitoring the e-mail of Yemen-based Anwar al-Awlaki said he had communicated with Maj Hasan - a US-born Muslim and army psychiatrist - on 10 to 20 occasions.
However, it was decided that further investigation was not needed, as the content of the messages did not advocate or threaten violence.
FBI Director Robert Mueller has ordered a review of how the agency dealt with information about Maj Hasan.
A senior Republican on the House of Representatives Intelligence Committee has called on all the US intelligence agencies to preserve the information they have on Maj Hasan.


Publish a clear and detailed BoG recapitalisation plan — NPP urges gov't
Completely abandon idea of selling BoG headquarters — NPP urges gov't
French President Macron to attend Ghana's Next Steps Conference on Reparatory Ju...
Nyinahin Catholic SHS teacher seen fighting female student in viral video arrest...
Beijing condemns US move to blacklist Chinese companies
Trump gets a cold reception at NBA Finals game as Spurs beat Knicks
One dead, fire officer hospitalised after bee attack at Quarry Site in Sokode Gb...
Israel and Iran step back from further strikes after renewed clashes
Patients stranded as doctors, nurses refuse to see new patients over KATH CEO su...
Avenor Rural Bank CEO’s house destroyed by fire
