Afghan security forces were supported and trained by the US over the past two decades at a cost of $83 billion, but collapsed so quickly and completely – in some cases without a shot being fired – that the ultimate beneficiary of such investment has been the Taliban.
The insurgents have seized political power as well as US-supplied equipment and firepower, including guns, ammunition and helicopters.
The Taliban captured modern military equipment when they overran Afghan forces who failed to defend urban centres. Other resources were captured, including combat aircraft, when the Taliban took over provincial capitals and military bases.
The group captured the biggest prize, Kabul, at the weekend.
On Monday, a US defence official said the Taliban had accumulated an enormous amount of US-supplied equipment.
It is the consequence of misjudging the viability of Afghan government forces – by the US military, as well as intelligence agencies. In some cases Afghan forces chose to surrender their vehicles and weapons rather than fight.
The failure of the US to create a sustainable Afghan army and police force, and the reasons for their collapse, will probably be studied for years by military analysts.
But the basic dimensions are clear and are not unlike what happened in Iraq.
The forces had superior arms, but were largely missing the crucial ingredient of combat motivation.
“Money can't buy will. You cannot purchase leadership,” Pentagon spokesman John Kirby said Monday.
Doug Lute, a retired army lieutenant general who helped to direct Afghan war strategy under presidents George W Bush and Barack Obama, said Afghan forces could not win with US equipment alone.
“The principle of war stands – moral factors dominate material factors,” he said.
“Morale, discipline, leadership, unit cohesion are more decisive than numbers of forces and equipment. As outsiders in Afghanistan, we can provide materiel, but only Afghans can provide the intangible moral factors.”
By contrast, the Taliban, with fewer fighters, less sophisticated weaponry and no air power, proved a superior force.
The US largely underestimated the scope of that superiority. Even after President Joe Biden announced in April that he was withdrawing all US troops, intelligence agencies did not foresee such a successful Taliban offensive.
“If we wouldn’t have used hope as a course of action, we would have realised the rapid drawdown of US forces sent a signal to the Afghan national forces that they were being abandoned,” said Chris Miller, who served in Afghanistan in 2001 and was acting secretary of defence under former president Donald Trump.
Stephen Biddle, a professor of international and public affairs at Columbia University and a former adviser to US commanders in Afghanistan, said Mr Biden's announcement set the final collapse in motion.
“The problem of the US withdrawal is that it sent a nationwide signal that the jig is up – a sudden, nationwide signal that everyone read the same way,” Prof Biddle said.
Before April, Afghan troops were slowly but steadily losing the war, he said.
When they learnt their US partners were going home, an impulse to give up without a fight “spread like wildfire", he said.
But the failures in Afghanistan go back much further and run much deeper. The US tried to develop a credible Afghan defence establishment even as it was fighting against the Taliban, attempting to widen the political foundations of the government in Kabul and seeking to establish democracy in a country where corruption and cronyism was rife.
Year after year, US military leaders played down the problems and said success was coming. But others saw the situation differently. In 2015, Chris Mason, a professor at the Strategic Studies Institute of the Army War College, wrote about the military's failure to learn lessons from past wars. The title of his book was: The Strategic Lessons Unlearned from Vietnam, Iraq and Afghanistan: Why the Afghan National Security Forces Will Not Hold, and the Implications for the US Army in Afghanistan.
“Regarding the future of Afghanistan, in blunt terms, the United States has been down this road at the strategic level twice before, in Vietnam and Iraq, and there is no viable rationale for why the results will be any different in Afghanistan,” Prof Mason wrote.
“Slow decay is inevitable, and state failure is a matter of time.”
Some elements of the Afghan army did fight hard against the Taliban, including commandos whose efforts have not yet been fully documented.
But as a whole the security forces created by the US and its Nato allies amounted to a “house of cards”, said Anthony Cordesman, Afghanistan war analyst at the Centre for Strategic and International Studies.
Their collapse was driven as much by the failures of US civilian leaders as their military partners, he said.
The Afghan force-building exercise was so completely dependent on American largesse that the Pentagon even paid the salaries of Afghan troops. Too often that money, and untold amounts of fuel, were siphoned off by officers and government overseers who cooked the books, creating “ghost soldiers” to keep the misspent dollars coming.
Of the $145bn the US government spent trying to rebuild Afghanistan, about $83bn was used to develop and sustain its army and police forces, said the Office of the Special Inspector General for Afghanistan Reconstruction, a government watchdog that tracked the war since 2008.
The $145bn is in addition to $837bn the US spent fighting the war.
The $83bn invested in Afghan forces over 20 years is nearly double last year's budget for the US Marine Corps and slightly more than what Washington budgeted last year for food stamp assistance for about 40 million Americans.
In his book The Afghanistan Papers, journalist Craig Whitlock wrote that US trainers tried to force western ways on Afghan recruits and gave scant thought to whether the US was investing in a truly viable army.
“Given that the US war strategy depended on the Afghan army's performance, however, the Pentagon paid surprisingly little attention to the question of whether Afghans were willing to die for their government,” he wrote.