"Everybody got it wrong" on how quickly the Taliban would take over Afghanistan, the head of Britain's armed forces has said.
Gen Sir Nick Carter told the BBC: "It was the pace of it that surprised us and I don't think we realised quite what the Taliban were up to."
"It's not purely about military intelligence," he said.
The last British and US troops left Afghanistan a week ago, bringing their 20-year military campaign in the country to an end.
There has been criticism of the way the West withdrew from Afghanistan, with questions over how the Taliban was able to seize control of the country at such speed.
Foreign Secretary Dominic Raab told MPs last week the intelligence assessment had been that there would be a "steady deterioration" in the security situation in August but it was "unlikely Kabul would fall this year". However, the Taliban took over Kabul in mid-August.
Speaking to the BBC's Andrew Marr show on Sunday, Gen Sir Nick was asked how the predictions had been wrong.
The chief of defence staff said: "I don't think what anybody predicted was how fragile that Afghan government was and how fragile it was in relation to the command of its armed forces."
The Taliban is expected to announce a new government in the coming days, meaning foreign powers will have to adapt to the prospect of dealing with a Taliban administration.
International help needed
Gen Sir Nick said it was too early to say how the Taliban would govern, but there was a possibility the militant group would be less repressive than it was in the past.
"On the face of it, it doesn't look good at the moment. But let's see what happens. It may well change," he said.
"I also think they're not stupid enough to [not] know the Afghan people have changed and they want a slightly different sort of governance."
It was now down to the international community to encourage the Taliban to govern in a different way, he added.
"They're going to need a bit of help to run a modern state effectively," he said. "If they behave, perhaps they'll get some help."
Asked whether military intelligence was wrong, Gen Sir Nick said: "No... many of the assessments suggested it wouldn't last the course of the year and, of course, that's proven to be correct."
He said: "It's a much broader thing than just strictly military intelligence.
"The way it works in this country is we have the joint intelligence committee which sits inside the Cabinet Office. So what they do is pull together the sources from the Ministry of Defence, the Foreign Office, the inter-agencies and the secret intelligence services and wider open source material."
Currently, Taliban soldiers are fighting resistance groups in Panjshir Valley, the last remaining part of Afghanistan which the Taliban does not yet control.
On Saturday, the top US general said that civil war was likely to erupt in Afghanistan, and those conditions could lead to a resurgence of terrorist groups there.
Gen Mark Milley told Fox News: "The conditions are very likely that you could see a resurgence of terrorism coming out of that general region within 12, 24, 36 months."
Gen Sir Nick told the BBC the risk of terrorism will depend on whether an effective government can be formed in Afghanistan.
Labour's shadow foreign secretary Lisa Nandy said there was a strong possibility that Britain may now be less safe because of the events in Afghanistan.
"The urgent task for the government... is to make sure Afghanistan doesn't collapse once again into a haven of terrorism," she said.
She called on the UK to work with other countries - not just its allies - to take a common approach towards the Taliban, and use their leverage to demand rights for women and girls living in Afghanistan.
Earlier, former MI6 chief Sir Alex Younger, who stepped down from his role last year, told Times Radio that having no physical presence in Afghanistan would be a "blow" to intelligence networks.
And he added that "turning our back" on a place like Afghanistan "leads inexorably to an increase in the threat to our country".