What has the conflict cost the US and its allies?published at 12:39 British Summer Time 15 August 2021
As Washington poured in billions of dollars to fight the Taliban insurgency and fund reconstruction after invading in 2001, troop numbers went up.
Other countries were also part of the foreign military presence, but the US had by far the biggest single contingent - and racked up the largest bill.
Between 2010-12, when the US had more than 100,000 soldiers in Afghanistan, the cost of the war had reached almost $100bn a year, going by official figures.
One academic study, which looked at war costs in both Afghanistan and Pakistan, estimated the US had spent around $978bn since the 2001 (this includes money allocated for 2020).
The UK and Germany - which had the largest numbers of troops after the US - spent an estimated $30bn and $19bn respectively.