US Secretary of State Hillary Clinton said she "deeply, deeply" regretted the deaths, adding that the US would work hard to avoid such "loss of innocent life".
The bottom line at the summit was more American troops for Afghanistan and more aid for Pakistan, with the Obama administration deepening its involvement in the search for stability, the BBC's Kevin Connolly reports from Washington.
Mr Obama said Afghan President Hamid Karzai and Pakistani President Asif Ali Zardari fully appreciated the gravity of the security threats posed by militants.
Thousands have fled their homes in Pakistan in fear of violence
America, he said, was on the side of people in Pakistan and Afghanistan and had a comprehensive strategy for the region, with civilian and military components.
He said the insurgency must be met with a positive programme of growth, so that Pakistanis and Afghans could pursue the possibility of a better life.
President Obama said he expected more setbacks and violence to come, but there was a lasting commitment to defeat al-Qaeda.
The US would, he added, offer unwavering support to the governments of both Pakistan and Afghanistan.
"We have learned time and again that our security is shared," Mr Obama added. "It is a lesson that we learned most painfully on 9/11, and it is a lesson that we will not forget."
It's too late now, the incompetent politicians of this blighted land have made the things go beyond the point of no return
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.