As foreign governments, aid institutions and companies scramble to withdraw staff from Afghanistan, a crucial question is emerging: should they engage with the ruling Taliban or abandon years of investment in the country and 38 million Afghans?
In the past week, the Taliban have promised peaceful relations with other countries, women's rights and an independent media. But some former diplomats and academics said the Islamist militant group, while more media and internet savvy than the Taliban of the 1990s, is just as brutal.
The Taliban barred women from work, banned girls from school and killed or disfigured dissenters in public. They also harboured Al Qaeda, which plotted the 9/11 attacks on New York and Washington that prompted a US-led invasion.
For foreign aid agencies the situation presents "a paradox," said Robert Crews, a Stanford University history professor and author of the 2015 book Afghan Modern: The History of a Global Nation.
"If you are an aid worker at a state hospital, you are serving a regime whose legitimacy is in the balance," he said. "But if everybody goes home, will the state collapse?"
Afghanistan's government budget is 70 per cent to 80 per cent funded by international donors, including the US Agency for International Development, said Michael McKinley, who served as ambassador to Afghanistan in 2015 and 2016.
The country faces economic collapse without that aid.
"The Taliban are going to require substantial outside funding, unless they retreat to what they did from 1996 to 2001, which was essentially run the government to minimalist levels," said Mr McKinley, now with the Cohen Group consultancy. "Living off the narcotics trade did not provide them a path towards staying in power."
International failure to engage with the Taliban could set up an even larger crisis, some warn.
"There will be enormous temptation to just pull the plug and walk away, but we did that in 1989 and 9/11 happened 12 years later," said Daniel Runde, a development expert at the Centre for Strategic and International Studies in Washington.
While foreign governments and aid groups withdraw thousands of people, they are leaving billions of dollars in projects hanging in the balance, much of it through the Afghanistan Reconstruction Trust Fund.
The US has contributed $145 billion towards Afghan reconstruction since 2002, a July 30 report from the Special Inspector General for Afghan Reconstruction shows.
The World Bank is contributing more than $2bn to fund 27 projects in Afghanistan, from horticulture to automated payment systems, part of more than $5.3bn the lender has spent on development and reconstruction of the country.
On Friday a flight from Kabul landed in Islamabad with 350 people aboard, including employees from the World Bank Group and other international institutions. A World Bank internal memo viewed by Reuters confirmed that its Kabul-based staff, including Afghan employees, had been flown out with their immediate families.
"Our work in Afghanistan has been critical for development across the region. I am hopeful we will be able to have a positive impact once the situation stabilises," president David Malpass wrote.
The Asian Development Bank, also with extensive operations in Afghanistan, remains "committed to supporting Afghanistan’s economic and social development," the group said in a statement.
Myanmar, upended by a military coup last year, provides some parallels. In February the World Bank and the International Monetary Fund suspended all disbursements and projects there, a freeze that continues despite the spread of Covid-19 in the country.
Both organisations said they are guided by their membership when dealing with such abrupt changes of government and the US holds dominant shares in both.
The IMF suspended Afghanistan's access to its resources, including about $440 million in new monetary reserves that the IMF allocated on Monday.
Companies, including the US's big social media firms and natural resources groups are split over how to deal with the Taliban, reflecting wider inconsistencies in how the international community classifies the group.
"We ought to take at some level of face value the statements that are coming out of the Taliban leadership," Mr Runde, of CSIS, argues. "They're going to have to prove they're serious about this."
Ryan Crocker, who served as ambassador to Afghanistan in 2011-2012, and who has sharply criticised the US military exit from the country, said trusting the Taliban should not be an option.
"The Taliban are back in control, and they will bring their Al Qaeda allies with them," Mr Crocker said in a blog post on the Carnegie Endowment for International Peace website.
"This is not a hypothetical security threat. These are the groups that brought about 9/11, and they have not become kinder and gentler in the interim."