Some 8,000 UK troops are currently in Afghanistan
British forces may be in Afghanistan for another five years while civilians could stay more than 20 years, the new UK ambassador to Afghanistan has said.
Mark Sedwill, who will take up his post next week, told BBC Radio 5 Live the Afghan army and police should be strong enough in five years to take over.
But he said British workers would be there much longer helping with reconstruction and development.
His new job involves close liaison with the British military command.
Mr Sedwill outlined his purpose as being to support the British military and co-ordinate the British effort alongside allies, the UN and Nato.
"I think in a few years' time, I hope maybe five, maybe a bit more, that we will have built up the Afghan army and the Afghan police to the stage where they can take on more of the fight themselves. Then we will see our troops step back.
"On the civilian side, we will be there for a very long time. There's a massive job to do."
This includes supporting the Afghan government to make the country stable and secure, governance, reconstruction, development and tackling narcotics.
Mr Sedwill welcomed the 17,000 extra US troops promised by US President Barack Obama.
"We have got to take advantage of that and that's got to make the Taleban think that they can't win this militarily," he said.
The UK currently has more than 8,000 troops in Afghanistan.
Asked whether that number was likely to increase, Mr Sedwill said the government would review it if more were needed but the issue was to get the Afghans to build up their army.
In May, President Hamid Karzai, whose relations with the US have been strained in recent months, leaves office. However elections to find a new leader are not until August, potentially leaving a leadership vacuum.
Mr Sedwill said however it was likely Mr Karzai would stay in his post until the August elections.
Mr Sedwill takes over from Sir Sherard Cowper-Coles, who has been appointed the Foreign Secretary's special representative for Afghanistan and Pakistan.
Mr Sedwill described having his "arm twisted" to apply for the position, but admitted it was a "fantastic job".
"You don't always get the chance to make a difference to one of the most important situations affecting our country," he said.
In a statement, Foreign Secretary David Miliband said: "Mark Sedwill and his team will ensure that Britain does all it can to help Afghanistan build a secure future in which terrorism and insecurity have no place."