The US president, Barack Obama, has promised to speed up a transfer of lead security responsibility from Nato to Afghan forces in spring, in a sign that US troops may withdraw faster.
Nato forces would have a "very limited" role in the country after 2014, Obama said.
He insisted that Washington had achieved its prime goal of "decapitating" al-Qaeda.
Obama met Afghan President Hamid Karzai on Friday at a crucial moment in the final chapter of a long, bloody war, and as Obama balances the future security of Afghanistan with US combat fatigue and a desire to spend America's dwindling resources at home.
"Starting this spring, our troops will have a different mission - training, advising, assisting Afghan forces," he said.
"It will be a historic moment and another step towards full Afghan sovereignty."
Karzai said that from the spring, "the Afghan forces will be fully responsible for providing security and protection to the Afghan people".
"International forces, the American forces, will be no longer present in the villages … It will be the task of the Afghan forces to provide for the Afghan people in security and protection."
Nato plans previously called for foreign forces to transfer the lead in fighting the Taliban by the middle of this year.
Obama, planning the withdrawal of most of the 66,000 US troops left in Afghanistan, was careful to stress that American soldiers would still fight alongside Afghans. He said that after 2014, American forces would have a "very limited" mission in training Afghan forces and preventing a return of al-Qaeda.
But he warned that Karzai, with whom he has had a somewhat testy relationship, would have to accept a security agreement, still under discussion, granting legal immunity to US troops who remained behind.
"It will not be possible for us to have any kind of US troop presence post-2014 without assurances that our men and women … are [not] in some way subject to the jurisdiction of another country," Obama said.
Karzai announced progress on another sticking point, saying the leaders had agreed to a complete return of detention centres and terror suspects to Afghan control, starting soon after he returned home.
He would not be drawn on the size of the foreign troop garrison he believed was necessary to support Afghan forces.
Obama said that despite the huge human and financial cost of the 12-year war, it was important to recognise that it had been waged in response to the September 11 attacks and had achieved its central goals.
"There is no doubt that the possibility of peace and prosperity in Afghanistan today is higher than before we went in," he said. "Have we achieved everything that some might have imagined us achieving in the best of scenarios? Probably not. You know, there is a human enterprise, and you fall short of the ideal."
Karzai pledged to stand down at the end of his second term, after elections next year.
"The greatest of my achievements … will be a proper, well-organised, interference-free election in which the Afghan people can elect their next president," he said. "And certainly I will be a retired president, and very happily a retired president."