The deadly attack on Kabul airport has underlined the realpolitik facing Western powers in Afghanistan: engaging with the Taliban may be their best chance to prevent the country sliding into a breeding ground for Islamist militancy.
Almost two weeks after the Taliban's surprise return to power, officials in Europe are beginning to acknowledge that their pragmatic option is to put aside distaste for the country's new leaders and work with them instead.
"It is clear: the Taliban are reality in Afghanistan now," German Chancellor Angela Merkel said this week. "This new reality is bitter, but we have to work with it."
A senior European Union official said it is not enough for G7 powers to take the moral high ground and adopt an aggressive stance towards the Taliban, not least because that would hand China and Russia greater say over the future of the country.
He said that in recent days, Pakistan and Turkey have urged Western nations "not to corner the new regime too quickly", to hold off imposing sanctions on Kabul and keep channels of discussion open to avert a security and migration meltdown that could have ripple effects across the globe.
Aid will be an important part of that outreach given the humanitarian crisis in a country beset by conflict and drought, with 5.5 million of its 40 million people internally displaced.
The EU said this week it would increase its support for Afghans still in the country and those fleeing it to over 200 million euros ($235 million) from over 50 million euros.
The United States is taking steps to allow humanitarian work to continue but has not reduced sanctions pressure on the Taliban, which it designates a terrorist organisation.
Washington does not appear to have come around to the view held in European capitals that the Taliban is the least bad option.
'Morale boost for radicals'
The United States' unruly retreat from Afghanistan after 20 years trying to bring it stability and democracy has been, in the words of former US ambassador to Afghanistan Ryan Crocker, "an enormous morale boost for Islamic radicals everywhere".
The suicide bombings outside Kabul airport on Thursday, which were claimed by Islamic State, an enemy of the West and the Taliban alike, were a reminder that extremist militants could gain a foothold if the country was allowed to implode.
US officials believe Islamic State Khorasan (ISIS-K), an Afghan affiliate of Islamic State with a reputation for extreme brutality, was behind the attacks. They say it has used the instability that led to the collapse of the Western-backed government this month to strengthen its position.
"The issue is not that the Taliban control the country right now, it's that the Taliban really don't control the country and nobody does," Crocker told CNN. "That is a breeding ground for these kinds of actions and for these kinds of people to come back and take root. And that is what brought us 9/11, we've now got the same dynamic."
Thomas Ruttig, co-Director of the Afghanistan Analysts Network, said there may be no appetite in the West to "cosy up" with the Taliban, which enforced a strict version of sharia when in power from 1996-2001, but "confronting and lecturing" them from the outset will not help vulnerable Afghans.
Germany in particular appears to be taking that approach.
Its former envoy to Afghanistan, Markus Potzel, is in talks with the Taliban representative in Doha to keep Kabul airport operating for evacuations after the Aug. 31 cut-off date.
German Foreign Minister Heiko Maas will travel to the region for talks in Tajikistan, Uzbekistan, Pakistan, Turkey and Qatar on "how the international community can handle Afghanistan now", according to a letter from his ministry to parliament.
"There is no way getting around striking agreements with the Taliban," the letter said. "...Not only to facilitate a safe departure of people in need of protection, but also to safeguard the most important achievements of the past two decades."