President Obama on Thursday expressed shock at the “senseless violence” in Fort Hood, calling the mass shooting which took the lives of American troops at their home base -- far from the battlefield -- ”tragic.”

"These are folks who make such extraordinary sacrifices for us each and every day for our freedom. During the course of a decade of war, many of them have been on multiple, you know, tours of duty,” said Obama, in brief remarks at a White House event to honor Olympic and Paralympic athletes. “To see unspeakable, senseless violence happen in a place where they're supposed to feel safe -- home base -- is tragic.”

On Wednesday at Fort Hood in Texas, an Iraq veteran killed three and wounded 16 before turning a gun on himself. Army Specialist Ivan Lopez, the lone suspect, served in Iraq in 2011. The Army said that he had been receiving treatment for Post-Traumatic Stress Disorder but had shown no previous signs of violence.

Obama noted that it was the “second time that the Fort Hood community’s been affected this way.”

Five years ago, Army Major Nidal Malik Hasan killed 13 and injured more than 30 in a shooting spree at the base. Hasan was sentenced to death and is awaiting execution.

“We join that entire community in honoring those who lost their lives. Every single one of them was an American patriot,” said Obama. “We stand with their families and their loved ones as they grieve. We are thinking about those who are wounded. We're there to support them.”

The president vowed that in the days ahead he would do everything to keep the troops safe and look for ways to provide more help to the nation’s military veterans.

“As we learn more about what happened and why, we're going to make sure that we're doing everything in our power to keep our troops safe and to keep our troops strong, and not just on the battlefield but also when they come home,” Obama pledged.

“They put on their uniform and then they take care of us, and we've got to make sure that when they come home, we take care of them,” he added.

White House press secretary Jay Carney on Thursday said that Obama had “directed his team to utilize every resource available to fully investigate the shooting.”

But Carney sidestepped questions about the effect the latest mass shooting would have on the nation’s contentious gun-control debate.

“I would urge you to wait until a little more time has passed since we are dealing with the immediate circumstances of this incident,” Carney told reporters.

But he said that, separate from the incident, Obama had long expressed his frustration at the lack of legislation to reduce gun violence.

“What I can say is that the president made abundantly clear his disappointment and frustration with Congress and its failure to listen to the overwhelming majority of the American people when they made clear they wanted to see the background check system made more effective and expanded,” said Carney. “That was a proposition that in no way violated our Second Amendment rights, rights which the president supports.”

A bipartisan measure to expand background checks on firearm purchasers failed in the Senate in 2013.

“We'll continue to look for ways to implement common-sense solutions to this very challenging problem,” Carney said.