The Taliban’s triumphant march into Kabul seven days ago was the result of long-term planning and rank opportunism.

For weeks, Western leaders had insisted it just wouldn’t happen; in one heated briefing with journalists, the Chief of the Defence Staff, General Sir Nicholas Carter, even attacked the media for being unpatriotic and claimed that NATO forces had scored a strategic victory.

But for 72 hours over an August weekend, and with many senior officials away on their summer holidays, the world watched wide-eyed as the Taliban made their way into the central squares of city after city and finally through the gates of Kabul itself.

So how did this happen? How did 20 years of hard fighting, close mentoring, and vast financial investment unravel in only 11 days?

How did the “greatest military force ever assembled”, as George W Bush called it, not manage to defeat a group of mere “country boys”, as Gen Carter described them?

For this article, Sky News has spoken to a series of serving and retired military commanders, intelligence officials, and politicians. Between them they have decades of experience in Afghanistan. They tell a story of abandonment that has “left a stain on the West”, political short-sightedness that “demonstrates an ignorance of history and culture” and a future that is “uncertain, unpredictable, and will almost certainly come back to bite”.

***

On 29 February 2020, weeks before the world was crippled by the COVID-19 pandemic, America signed a peace deal with the Taliban in Doha, Qatar.

From The White House briefing room in Washington DC, president Donald Trump described American forces as “the greatest fighters in the world”, but said “it’s time, after all these years, to bring our people home”.

Around the same time in Kabul, his defense secretary Mark Esper admitted “the road ahead won’t be easy”, while Afghanistan’s then-president Ashraf Ghani, standing next to the American but not a part of the talks, said his government was “ready to negotiate with the Taliban”.

From NATO to the UN, Berlin to London, the deal was welcomed with caution. Although many failed to share the American optimism, most knew the day had been long coming and accepted it.

“We went in together and we will leave together,” the alliance’s Secretary General Jens Stoltenberg said at the time.

Britain’s defence secretary, initially a cautious supporter of the deal, has since described it as “rotten”, but too late. At the time Britain and other allies kept on message, afraid of angering Washington. On reflection, perhaps they should have spoken out sooner.

After the deaths of 2,400 US troops, 457 British troops and more than 60,000 Afghans, this was the beginning of the end – just not how anyone expected it.

It isn’t possible to point to a precise moment when everything started to unravel. Instead a series of events culminated over a relatively short period that, in the words of a military commander with knowledge of the situation, “sapped the confidence of the Afghan forces and passed the initiative to the enemy”.

The departure of civilian contractors, many of them ex-military, removed the network of logistical and engineering support so vital to any war effort.

But it was perhaps the loss of allied air support that crippled the fighting power of the Afghan forces and left them so exposed on the battlefield.

“For years they had gone into the fight with ground knowledge from our ISR assets (intelligence, surveillance, reconnaissance), knowing they could then call-in air power if needed,” one former RAF pilot told us.

“We trained them to fight like that.

“You suddenly remove this safety blanket and they’re on their own; they knew that, and even worse, so did the Taliban.

“The truth is, most NATO forces wouldn’t fight without this backup, and yet we were expecting the Afghans to.”

Although the US continued limited airstrikes against Taliban positions, they weren’t enough to halt the advance, and besides, the Pentagon had made clear that support would come to an end by September.

“(US President Joe) Biden and others can say what they like about the failings of the Afghan Security Forces in recent weeks, but they merely expose their lack of understanding of warfare – it is not about numbers, or even training or equipment. It is about morale, will and confidence,” is the blunt assessment of one former head of British forces in Helmand Province.

“The US and NATO’s abandonment left them floundering, devoid of belief and fighting spirit. By contrast it buoyed the Taliban, giving them an unwarranted sense of legitimacy. The result, while swifter than most informed people expected, was pretty much inevitable.”

Through July, as the Taliban advance grew momentum, Afghan forces withdrew from some of the rural areas to concentrate on major routes, border crossings and key cities. It was a deliberate strategy to protect the bits that mattered, but the strategy of an army already on the run.

In late July, I met the Afghan National Security Advisor Hamdullah Mohib on a visit to London. He tried to put a brave spin on events: “Losing districts means we can focus on other areas. It’s not as bad as the Taliban would have you believe – they are winning the media war but not the military one.”

But Mr Mohib, who has since fled Afghanistan, knew by then that things weren’t looking good.

“The Americans probably didn’t realise how dependent the ANSF [Afghan National Security Forces] were on our NATO partners. The withdrawal has had a devastating impact. The Taliban are like zombies: kill or be killed.”

Despite this downbeat assessment, Mr Mohib was still devising his national security strategy for the coming six months; if he had any inkling of what was coming, he never let on.

For years they had gone into the fight with ground knowledge from our ISR assets (intelligence, surveillance, reconnaissance), knowing they could then call-in air power if needed…

The truth is, most NATO forces wouldn’t fight without this backup, and yet we were expecting the Afghans to.

Former RAF pilot

Through my many trips to Afghanistan perhaps one message was more consistent than any other, no more so than when I stood in the hills outside Kabul and watched new officer recruits tackling an assault course.

This “Sandhurst in the Sand” academy was supposed to be Britain’s legacy to Afghanistan, and I was repeatedly told how it was a “generational commitment” to train, mentor and nurture the commanding officers who would ensure stability and peace long after NATO left.

“We need to be here for years, possibly decades,” a British soldier told me at the time. “When an entire generation has passed through these gates and the head of the Afghan Armed Forces has been trained by us, here at this academy, then it will be ok to leave.”

That was only three years ago. The commitment will never be fulfilled.

On my last visit to Kabul, the city felt different to previous trips. Afghans oversaw security, manned checkpoints, and guarded major buildings. NATO forces sped across the capital in armoured vehicles but stayed largely behind the scenes. It was very clear there had been a deliberate shift in responsibilities.

The Taliban still launched attacks from rural strongholds, and although the attrition rate among Afghan soldiers was high – too high – they were just about holding the peace. As far as NATO commanders were concerned, it was a workable situation.

“The more we stepped back, the more they stood up, but international assistance in the background was vital,” one former commander of Task Force Helmand reflected.

“They have the capacity for great courage and resilience, but the development of real institutional resilience was work in progress – it takes decades, not years, to grow institutions, particularly against the backdrop of Afghanistan’s wider challenges.”

The US withdrawal cut this short.

President Biden inherited the Trump peace plan but didn’t change it. In fact he expediated it by a few months, eager to make good on a campaign promise to bring America’s longest war to an end.

In recent days Mr Biden has sought to justify his decision by arguing that remaining in the country for another “ten, fifteen years” would have made little difference. Maybe he’s right, we’ll never know, but few outside of government share that view.

The Afghan soldiers have the capacity for great courage and resilience, but the development of real institutional resilience was work in progress – it takes decades, not years, to grow institutions, particularly against the backdrop of Afghanistan’s wider challenges.

A former commander of Task Force Helmand

For one recently retired British general, with long operational experience in the Middle East, the politicians are to blame for what the country is going through now.

“As an Afghan, who do you trust more: the countryman who says he will kill you, or the foreigner who says he will protect you? When we lead, or fight alongside ‘native troops’, they will perform wonders, but their own commanders and political masters routinely betray them by corruption or refusal to accept responsibility.

“The US withdrawal and the inevitable collapse of the Afghan security forces means that every other aspect of our 20-year engagement (political, institutional, educational, social, health etc) has also collapsed.

“What was an ‘economy of force’ operation (very little blood, and relatively small amounts of treasure, given our overall investment in Afghanistan, rightly or wrongly) was needlessly and avoidably halted, with all the predictable consequences, so Joe Biden could meet a totally artificial deadline.”

Please use Chrome browser for a more accessible video player

President Biden’s criticism of Afghan forces for failing to stand up to the Taliban has been widely criticised

He is not alone in pointing the finger at Washington.

“Yes, exit was Trump’s policy,” tweeted the former British ambassador Tom Fletcher. “Yes, he would have communicated and executed it in an even clumsier, more crass way. But we expect empathy, strategy and wisdom from Biden. His messaging targeted Trump’s base, not the rest of world and not allies past or future.”

Others are angry at their own party.

One British Conservative MP texted to say: “I don’t really see the point of being in the Tory party anymore”, while another simply messaged three words: “Tragic. Unnecessary. Shameful.”

A few days before the collapse of Kabul, Britain’s Defence Secretary Ben Wallace, himself a former soldier, broke diplomatic cover to reveal that he had tried to persuade some fellow NATO allies to stay in Afghanistan once the US had left. He failed, and by then it was too late.

The appetite to operate without American backup just wasn’t there – this chaotic episode has exposed NATO’s weaknesses and shone a harsh light on years of defence cuts that have left the British Armed Forces either unable or unwilling to go it alone.

President Biden’s criticism of Afghan forces for failing to stand up to the Taliban has been widely criticised. As a nation Afghans have paid a far, far higher toll than any other, but as the inevitable became clear, they deserted their posts and in some cases the country altogether.

On Saturday 14 August, the day before Kabul fell, 24 Afghan helicopters carrying almost 600 servicemen flew in secret to Uzbekistan.

Hundreds more crossed the Amu Darya river on Afghanistan’s northern border, but were detained by Uzbek border troops.

Others made for the Panjshir Valley, north of Kabul in the Hindu Kush. The lush, mountainous region is still dotted with rusting tanks, destroyed during the Soviet occupation in the 1980s, relics of a long history of resistance. If an uprising against the Taliban is going to come from anywhere, it will be the Panjshir, the one corner of Afghanistan the Taliban doesn’t control.

By Sunday lunchtime it was all but over. By now the Taliban was inside the capital, and en route to the Presidential Palace.

Knowing the game was up, soldiers changed out of their combat fatigues and melted into the crowds, fearful of Taliban retribution.

Western capitals watched aghast. The few official statements that did come out were largely out of touch and outpaced by the fast-moving events on the ground.

Remarkably some still called for a “political solution”, but there was nothing left to negotiate. The Taliban had won.

NATO might have abandoned Afghanistan first, but the country’s president and senior leadership followed swiftly afterwards.

Ashraf Ghani fled with his family and close aides. Reports said he was denied entry to Turkmenistan; he eventually surfaced in the United Arab Emirates, vowing to return and fight but Mr Ghani, not hugely popular when in power, is even less so after deserting his country.

Echoing the thoughts of so many who deployed in service of their country, one officer, still serving at the top of the chain, wrote to say: “The abandonment of our Afghan partners is a stain on the West. It leaves those who sweated, fought, suffered (and continue to suffer) and grieved feeling horrified and betrayed.”

One intelligence source defended accusations they didn’t see it coming, saying: “We did.

“Ok, maybe the speed of the Taliban advance took us a bit by surprise, but a swift Taliban overthrow was one of the scenarios we put to politicians. The problem is, they either didn’t want to hear it, or didn’t know what to do with it.”

MI6 and the CIA could do nothing but stand back and watch as the Taliban ripped through.

“I felt like crying,” another British intelligence officer confided. “We’ve spent decades trying to understand the country, building networks and relationships to ultimately keep Britain safe. Within days it was all undone. We go back to the drawing board. Many of the assets, who risked their lives to help us, are now in grave danger.”

In 20 years of conflict and reconstruction, however, Afghanistan has been undeniably transformed.

Education attendance is up, especially among girls; women have been able to work and represent their country in government, sport and music; roads have been tarmacked, improving transport links; and access to medical services, especially maternity care is vastly better. When widows and injured veterans reasonably ask: “Was it all worth it?”, these are the improvements they can be rightly proud of.

But for all that, the enduring images that publishers will put on the front covers, when the historians write the final accounts of yet another failed intervention in this graveyard of empires, will be two moments in the dying days of this mission. One is the heartbreaking sight of babies being passed over barbed wire to helpless soldiers by mothers so desperate, that they can see no other way.

The other is a photograph of Afghan men, clinging to the side of a giant US C17 transport aircraft as it gathers pace down the runway of Kabul airport leaving Afghanistan behind, in the hands of the Taliban.

For 20 years, as the fighting raged and death toll increased, the Taliban waited, believing NATO would eventually run out of patience. It turns out, they were right.