David Cameron today insisted Afghan forces will be able to prevent their country again becoming a haven for terrorists after international forces pull out.
Attending the opening day of the Nato summit in Chicago, the Prime Minister said "one way or the other" the majority of British troops would be home by the end of 2014.
Earlier however, a senior official disclosed that a "small number" of British troops - most probably special forces - could remain in a counter-terrorism role.
It is the first time anyone in government has raised the prospect of any form of combat role for British troops after 2014, ministers having previously said any remaining troops would simply be there to train and mentor the Afghan forces.
Mr Cameron stressed that he remained confident the Afghan forces would be able to prevent a return of al Qaida to the country, having made "huge progress" in the past two years.
"We have to remember why we're in Afghanistan. We're there to stop it becoming a haven for terrorist training camps," he said.
"I'm very confident that one way or the other our troops will come home and Afghanistan will be looked after by Afghan security forces who will be capable of maintaining security in their country and, crucially for us, stopping it from being a terrorist training haven that can affect us at home in terms of terrorist attacks."
After new French President Francois Hollande confirmed French troops would be ending combat operations this year - in line with his election pledge - Nato Secretary General Anders Fogh Rasmussen insisted the alliance was not abandoning Afghanistan.
"There will be no rush for the exits. Our goal, our strategy, our timetable remain unchanged," he said.
The Taliban, however, issued a statement urging other alliance member to follow the French example and pull out their forces.
"We call upon all the other Nato member countries to avoid working for the political interests of American officials and answer the call of your own people by immediately removing all your troops from Afghanistan," he said.
Much of the discussion in Chicago will centre on how the Afghans manage after 2014.
After surging to a maximum strength of 350,000 police and troops, the Afghan national security forces are due to fall back to around 230,000.
However that still leaves an annual bill of four billion dollars (£2.8 billion) to be picked up by the international community and the Americans are looking to Nato partners to contribute about a quarter of the total.
Britain has already pledged 100 million dollars (£70 million) a year and the US is hoping for further commitments during the course of the summit.
The gathering is also considering the future role of the alliance itself as economic austerity forces governments to squeeze defence spending.
Mr Cameron argues that reduced spending on armed forces must not mean any lowering of Nato's ambition, and that it must continue to be prepared to tackle threats beyond its borders.
He is also reiterating the importance of Europe pulling its weight in the alliance - genuinely partnering the US rather than subcontracting its security to Washington.