"I know that our troops will continue the hard work of transitioning to a stronger Afghan government and ensuring that Afghanistan is not a safe haven for terrorists," Obama said.
"We will press on and we will succeed," Obama said his remarks to the White House correspondents on Monday.
"There is no one who embodies the qualities that I mentioned more than the men and women of the United States armed forces, and this weekend we lost 30 of them when their helicopter crashed during a mission in Afghanistan," he said.
"And their loss is a stark reminder of the risks that our men and women in uniform take every single day on behalf of their country. Day after day, night after night, they carry out missions like this in the face of enemy fire and grave danger. And in this mission, as in so many others, they were also joined by Afghan troops, seven of whom lost their lives as well," he said.
Obama said now is the time to reflect on those US soldiers lost and the sacrifices of all who serve, as well as their families.
"These men and women put their lives on the line for the values that bind us together as a nation. They come from different places, and their backgrounds and beliefs reflect the rich diversity of America," he said.