FORT HOOD, Texas — President Obama returned to the grieving Army post Wednesday where he first took on the job as the nation’s comforter five years ago, mourning with families and uniformed comrades of those killed during last week’s Fort Hood shooting spree. “We somehow bear what seems unbearable,” he declared.

It was yet another sad observance for a president who has had to deliver words of consolation across the country many times. At Fort Hood, the ceremony was made more poignant as a remembrance for soldiers who didn’t die in wars abroad but in the safety of their own compound.

“They were members of a generation that has borne the burden of our security for more than a decade of war,” Obama said on a breezy, sun-washed day in central Texas.

Three soldiers died and 16 others were wounded in the rampage last Wednesday by another soldier, who killed himself.

The president and first lady Michelle Obama arrived late Wednesday morning at Fort Hood, where the camouflage fatigues of troops standing to salute his passing motorcade almost blended in with a patch of desert-like terrain. Flags were lowered to half-staff at the sprawling Army post, where Obama met with victims’ relatives before offering his public condolences.

The memorial took place at the same spot where Obama eulogized victims of another mass shooting in 2009.

Fort Hood is a major post from which troops have been deployed to Iraq and Afghanistan.