U.S. President Barack Obama told the families of the 13 soldiers killed in last week's mass shooting at an army base in Texas that their loved ones "will endure through the life of our nation," at a memorial honouring the dead on Tuesday afternoon.

Obama and his wife, Michelle, joined thousands of civilians, soldiers and politicians at the memorial at Fort Hood, Texas, where an Army psychiatrist is accused of going on a shooting rampage, wounding 29 others before being shot down.

Nidal Malik Hasan is still alive in hospital, and reportedly met with his lawyer for the first time Monday night.

The memorial began about 40 minutes late, presumably because Obama was meeting with the families of those who were killed, as well as the wounded and their families.

Obama told the crowd that the fact the shooting happened at an American base and not on a foreign battle field made "this tragedy more painful, even more incomprehensible."

"For those families who have lost a loved one, no words can fill the void that's been left," Obama said under a hot Texas sun.

"We knew these men and women as soldiers and caregivers. You knew them as mothers, fathers, sons and daughters, sisters and brothers. But here is what you must also know. Your loved ones endure through the life of our nation. Their memory will be honoured by the places they lived and the lives that they touched."

Speaking before Obama, Lt.-Gen. Robert Cone, the commander of Fort Hood, told the victims' families that "our Army family deeply mourns the loss of your loved ones."

Cone said that while Fort Hood has suffered the loss of 545 soldiers in Iraq and Afghanistan, "never did we expect to pay such a price at home, a place where soldiers feel secure."

Army chief of staff Gen. George Casey praised the soldiers and civilians who stopped to help their wounded comrades, despite some being hurt themselves.

"That we saw countless examples of our warrior ethos in action last week is a great source of pride," Casey said.

"Our soldiers and Army civilians lived the warrior ethos that day, just as our soldiers and civilians live it every day in Afghanistan, Iraq and around the world: I will always place the mission first, I will never accept defeat, I will never quit, and I will never leave a fallen comrade."

As is military tradition, the dead were honoured with a lineup of 13 pairs of combat boots that ringed the speaker's podium. Each boot held an inverted rifle topped with a helmet.

Obama paid tribute to each of the 13 dead, which included 12 soldiers and one civilian. He named each of them and spoke about their lives and military service.

In his remarks, Obama denounced the "twisted logic" that led to the shooting, and promised justice for the victims.

"No faith justifies these murderous and craven acts; no just and loving God looks upon them with favour," Obama said. "And for what he has done, we know that the killer will be met with justice -- in this world and the next."

After Obama spoke, a role call of the names of those killed was followed by a 21-gun salute. The president and first lady then paid their respects to each of the dead, placing a commander-in-chief coin by each of the 13 pairs of boots.

After the memorial, the Obamas will travel to a military hospital to meet with the wounded who have not yet been discharged from hospital.

Obama had been scheduled to leave on Wednesday for a tour of Japan, Singapore, China and South Korea, but delayed his departure until Thursday in order to attend the memorial.

Motive for shooting still unclear

Hasan was shot three times by a female police officer, putting the deadly shooting spree to an end. It was initially reported that he was killed, but later emerged that he was still alive and in hospital.

According to ABC reporter Diana Alvear, Hasan, who will have a military trial, is awake and speaking, and met with his lawyer Monday night for the first time.

In an interview Tuesday morning with CTV News Channel, Alvear said questions are emerging about whether it will be possible for Hasan to receive a fair and unbiased trial in the military court system.

Connections are also emerging about Hasan's links to a radical Islamic cleric in Yemen, who had previously preached at a mosque in Virginia.

Hasan came to the attention of the FBI in December when it learned he had exchanged emails with the cleric Anwar al-Awlaki, and attended services at his mosque before he left the U.S. for Yemen in 2002.

Alvear said the FBI determined their communications to be benign, and consistent with research Hasan would do as part of his work as a military psychiatrist who counselled troops returning from war.

The cleric has praised Hasan on his website as a hero.

Officials have yet to determine a motive for the shooting.