A weakening in political support for the Afghan mission could encourage the Taliban to step up attacks on coalition forces, the head of Nato has warned.
Nato's Secretary General Anders Fogh Rasmussen said there could be no guaranteed withdrawal date for troops.
Last month Prime Minister David Cameron said he wanted UK forces out of Afghanistan within five years.
After Mr Cameron met Mr Rasmussen in London, No 10 said the country was the PM's "highest foreign policy priority".
Mr Rasmussen, who was in London for talks with Mr Cameron and Defence Secretary Liam Fox, said while he understood the desire to bring back forces, the international mission had to continue until the Afghans could take responsibility for their own security.
He told The Daily Telegraph: "We can have our hopes, we can have our expectations, but I cannot give any guarantee as far as an exact date or year is concerned.
"The Taliban follow the political debate in troop-contributing countries closely.
"If they discover that through their attacks, they can weaken the support for our presence in Afghanistan, they will just be encouraged to step up their attacks on foreign troops."
Mr Rasmussen said withdrawing too soon would not only lead to a renewed terrorist threat from al-Qaeda, but would also risk destabilising neighbouring Pakistan.
"The Taliban would return to Afghanistan and Afghanistan would once again become a safe haven for terrorist groups who would use it as a launch pad for terrorist attacks on North America and Europe," he said.
Downing Street said Mr Rasmussen and Mr Cameron had had a "positive and productive" meeting and the two men had agreed on the "central importance" of the ongoing international mission in Afghanistan "to the national security of the UK and all Nato allies".
A No 10 statement said: "The Prime Minister made clear that success in Afghanistan was his government's highest foreign policy and national security priority.
"The leaders agreed that the next year would be crucial. The current counter-insurgency strategy remained right. The recent troop surge provided the necessary military resources.
"The Prime Minister made clear his confidence in General Petraeus' ability to deliver progress on the ground."
No 10 said Mr Rasmussen and Mr Cameron had reaffirmed their view that accelerating training of the Afghan National Army and Afghan National Police was a key objective for the period ahead.
The had also discussed work on the new Nato strategic concept and "looked forward to working closely together in the run up to the Nato Summit in Lisbon", the statement added.