"There will be great challenges ahead," Obama said at the NATO summit in Chicago. "The loss of life continues in Afghanistan. There will be hard days.
"But we are confident we are on the right track and (what) this NATO summit reflects is that the world is behind the strategy we've laid out. Now it's our task to implement it effectively and I believe we can do so in part because of the tremendous strength and resilience of the Afghan people."
Karzai, Sunday thanked U.S. taxpayers for their support.
"I'm bringing to you and to the people of the United States the gratitude of the Afghan people for the support that your taxpayers' money has provided us over the past decade," Karzai told Obama after a meeting between the two, "and for the difference that it has made to the well-being of the Afghan people -- to our education and health and the building of the Afghan government."
After a separate meeting with NATO Secretary-General Anders Fogh Rasmussen, Obama said, "At this summit, we anticipate not only ratifying the plan for moving forward in Afghanistan -- a transition process that will bring the war to an end at the end of 2014 and put Afghans in the lead for their own security -- but we're also going to be talking about the progress that we've made in expanding NATO's defense capabilities -- ensuring that every NATO member has a stake and is involved and integrated in our mutual defense efforts."
The world economy poses a potential security challenge that NATO will be discussing at this week's summit in the United States, the head of the alliance said earlier.
Rasmussen told reporters in Chicago Sunday the austerity measures being implemented in Europe could make it difficult for the alliance to maintain its current military capabilities.
"Today, we will focus on security in an age of austerity," Rasmussen said before the opening of the high-level meeting. "We will ensure that the alliance has the capabilities to deal with the security challenges of the future – even as we tackle the economic challenges of the present."
NATO said in a written statement that the situation on Afghanistan would be on the agenda Monday. The discussions will include not only NATO member nations but partners in Asia and other areas of the world.
"Today's security challenges are global and they need global solutions," Rasmussen said. "That is why NATO will continue to cooperate with partners from right round the world."
Protest organizers at the summit said some protesters were injured in a clash with police late Sunday after a day of mostly peaceful protests. Video televised by WLS-TV, Chicago, showed police striking protesters with batons.
Occupy Chicago, an organizer of the demonstrations -- intended primarily to protest the Afghan war -- wrote on its Twitter page that police had "several demonstrators detained behind their lines, calling for medics. Bloodied protesters being dragged out of sight now."
A Chicago city official, speaking off the record, told CNN protesters identified as aggressors were "extracted" after an estimated 50-75 protesters threw objects at police and refused to leave the area.
Dennis Rodman pledges to end trips to North Korea
Susan Sarandon 'very excited' about daughter's pregnancy