Kim Sengupta is reporting for Reaction from Kabul.

“I want to talk about happy things, man”, Joe Biden complained at the 4 July press conference when asked about Taliban advances in Afghanistan. Five days later he declared, in answer to another Afghan question: “The likelihood there’s going to be the Taliban overrunning everything and owning the whole country is highly unlikely”. 

In his speech on Afghanistan on Monday, Biden put the blame for what had happened on the Afghans – the country’s leaders and its military – and maintained that nation-building should never have been attempted by the US which should have just focused on smiting terrorists and moved on. The decision to leave was the right one for America, said the US President. 

There was another press conference, very late last Sunday evening, in Kabul. It took place at the Presidential Palace vacated by Ashraf Ghani who had fled the country, supposedly for Tajikistan. Sitting around the President’s desk, with their faces mirrored on its surface buffed to a shine, were the Taliban.  

Centre stage went to a commander who said he was among the first inmates to be sent to Guantanamo Bay and had spent eight years there. He, at least, had happy things to talk about: the Islamist group’s victory and the defeat of America. 

The deployment of the Guantanamo inmate, who may have been Mullah Zakir, to celebrate triumph was a cute touch from the Talibs who have become proficient in the exercise of PR over the years. It became a standard joke among us journalists in Afghanistan covering the conflict that it was far easier to get through to the Taliban press office in Pakistan than those of the British forces in Helmand or the Americans in Kandahar. 

The white Taliban flag flying in Kabul now is a symbol of the failure of America’s longest war. Then there is the human cost of that failure. The chaotic and sad scenes at Kabul airport with thousands of people trying to get away – families, with babies and elderly relations, dragging suitcases for miles having abandoned their cars on the road. 

Up to seven people are reported to have died at the airport so far, three fell to their deaths after clinging on to the wheels of a C17 transporter as it took off. The others were said to have been shot or trampled to death.  

Checkpoints en route to the airport are now manned by the Talibs, examining the documentation of people who are trying to escape because they are under threat. Two streets down, a Taliban fighter, Hidaytullah from Paktika province, wanted to explain “everyone can live in peace, including those who worked with the government”. But there are those who oppressed people, oppressed Muslims, sometimes with foreigners, we need to find them and investigate them.” The investigations were well under way by Tuesday, with homes being searched. 

Then, of course, there are the women whose hard won rights would now be lost. In 2005 I interviewed five women who were supposed to reflect the brave new future of Afghanistan. Four were subsequently murdered by the Taliban. The fifth, a female MP for Kandahar, fled to Kabul after an attack on her and her husband in which he was killed. 

The Taliban may not be so homicidal now, but the likelihood is that women will be pushed back into the shadows and will suffer. I have met and got to know many of them during my two dozen visits to the country in the last 20 years.

Afshaneh Ansari, a friend’s sister who is a student at Kabul University, told me: “I wanted to be an artist trying to fuse Afghan and Western art. I am also an activist on gender issues. I don’t think that will be possible now, not in Afghanistan.

“You know, I was thinking this morning that I am 20 years old, I was born the year the Taliban rule ended. The life I wanted will end now, 20 years later”. 

Safira Janmohammed, someone else I have known for a long time, had started a hairdressing and make-up workshop for women from deprived backgrounds. This led to the opening of three shops. On Sunday her brother started painting over the photos of models on the window. Nine women will lose their livelihoods. 

But the war need not have ended so humiliatingly for the US, and so painfully for the Afghans.  

The collapse of the Afghan security forces has been truly spectacular; having covered quite a few missions with them, in which they have fought bravely and professionally, I was as surprised as anyone else by what transpired, especially after seeing some of the units initially acquit themselves well in Herat. 

What happened in Herat, however, was symptomatic of the rest of the conflict. I spent six days with the fighters of Ismail Khan, the veteran mujaheddin commander, the “Lion of Herat”, as they fought the Talibs on the outskirts of the city.  

Unlike his men with their body armour, Khan wears a white salwar kameez and a black waistcoat, his frame slightly stooped with age, but the eyes above the flowing silver beard were animated as he talks about what he sees as an existential struggle. 

“This campaign we are fighting now is one of the most important of my life. The Taliban are just the pawns of the Pakistanis: this is a war between the governments of Afghanistan and Pakistan. And if we lose this, then we would lose our country for a very long time,” he said, jabbing his finger in the air. 

A volunteer force he had organised and an army commando unit did well in pushing back the insurgents from the edge of the city, aided by bombing by American warplanes. A young Talib fighter who had come into Herat City, at great personal risk, to give me the Taliban point of view, said: “We only fear two things: God and US air strikes”. Two days later the Talibs walked into the city with minimal resistance, much to this fighter’s amazement, and the process of Afghanistan being lost for a long time continued. 

What went so wrong would, no doubt, be examined in detail in the future. But the fact remains that the US, with a force of around 2,500 augmented by 7,000 Nato and 750 British troops, had provided insurance against the Taliban and the elements of the Pakistani military and intelligence services, ISI, which fed and watered them. 

This was thrown away by the Trump administration at the ineptly handled talks in Qatar led by Zalmay Khalilzad, resulting in the deeply flawed Doha Agreement which gave the Taliban almost everything they demanded. 

Biden is now busy claiming that they inherited the bad deal from Trump. But throughout the US presidential campaign he repeatedly affirmed that he would not reverse the pull-out decision. He had done nothing since getting to the White House about the repeated breaches of the agreement by the Talibs, which would have allowed the US to review its own position. 

But then Biden lobbied strongly against the Afghan war while he was Barack Obama’s vice-president and argued, unsuccessfully at the time, about the surges of troops requested by the commanders. Biden had also, quite rightly, become a trenchant critic of the endemic corruption among the Afghan hierarchy, upbraiding President Hamid Karzai about it during visits to Kabul.  

Having pulled out the troops, the US President is now having to send twice as many to carry out a chaotic evacuation. The Taliban will most likely leave the US and UK forces to carry out the job: they have carefully avoided attacking Western troops following Doha, focusing their murderous campaign on fellow Afghans. 

As the West retreats from Afghanistan others are moving in, new alliances are being formed and old enmities revived between states and armed groups hovering for a division of the spoils.

As well as Pakistan, the Taliban’s chief sponsor, Russia and China are seen as likely big players here now. Beijing is ready to develop “good neighbourly, friendly and cooperative relations” with the new rulers of Afghanistan. 

Russia has long been building relations with the Talibs, and indeed has been accused by Washington of paying bounty to the group for killing US soldiers. Vladimir Putin’s envoy to Afghanistan, Zamir Kabulov, said after the Islamist takeover: “I have long since decided that the Taliban is much more able to reach agreements than the puppet government in Kabul.” 

Yet things may not be quite so straightforward in Islamist Afghanistan. An example of the twists and turns taking place was the handing over of five districts inside Afghanistan by the Talibs to the Jamaat Ansarullah, aka the Tajik Taliban, which is banned as a terrorist organisation in Tajikistan. 

In response the government in Dushanbe rushed 20,000 troops to the border and asked for Russian help. The Kremlin sent a thousand troops for an exercise with the armed forces of Tajikistan and Uzbekistan and said it would send urgent defence supplies to Tajikistan. 

Beijing may look forward to “good neighbourly” relations and the Chinese are expected to invest in Afghanistan with their “belt and road” scheme. But it is not just Tajiks who have been present alongside the Afghan Taliban in Badakhshan – fighters from Chechnya and Uyghurs from Xinjiang have also shown up.

Two weeks ago, China’s president Xi Jinping called on his country’s military command to strengthen its solidarity with the Communist Party as he warned of potential armed conflict along with security concerns at the country’s border with Afghanistan. 

There will be repercussions from what is going on here now. Biden in his speech said America should not have stayed behind after overthrowing the Taliban and that keeping a presence in Afghanistan was no longer in US national security interest.

The West has, of course, walked away from Afghanistan before, after using the mujaheddin against the Russians. We know what happened then: the creation of ungoverned space, terrorist camps, al-Qaeda and 9/11. Joe Biden may well find that abandoning Afghanistan does not actually take him to a happy place for long. 

Kim Sengupta is Defence and Security Editor of The Independent.