That's really going to require political and diplomatic work between Afghanistan and Pakistan, he said in response to a question from a visiting Afghan journalist when he asked the question of continued safe havens inside Afghanistan.
The United States, obviously, will have an interest in facilitating and participating in cooperation between the two sovereign countries, he noted.
"But as President Karzai, I think, has indicated, it's very hard to imagine a stability and peace in the region if Pakistan and Afghanistan don't come to some basic agreement and understanding about the threat of extremism to both countries and both governments and both capitals.I think you're starting to see a greater awareness of that on the part of the Pakistani government," Obama said.
Earlier in his opening remarks, Obama welcomed the recent steps taken by Pakistan towards reconciliation process. He was apparently referring to the recent release of Taliban prisoners by Pakistan.
"Reconciliation requires constructive support from across the region, including Pakistan. We welcome recent steps that have been taken in that regard, and we'll look for more tangible steps because a stable and secure Afghanistan is in the interest not only of the Afghan people and the United States but of the entire region," Obama said.
Earlier, the two leaders had three round of meetings in separate settings at the White House including one-o-one in the Oval Office, one with the two delegations and finally luncheon. Both the leaders expressed satisfaction over the progress made in the meeting.