Using a mix of coercion and persuasion, the Taliban launched an offensive early this year, signing surrender agreements with local leaders across Afghanistan who handed over insurgent bases and eventually entire provincial command centers.
It culminated this summer in a stunning military strike that brought the militants back to power, two decades after they were defeated by the United States and its allies.
It was a campaign marked by both collapse and conquest, carried out by patient opportunists.
Each surrender, small or large, gave the Taliban more weapons and vehicles – and, essentially, more control over roads and highways, giving them the freedom to move quickly and muster the next surrenders as security forces were gradually cut off from ammunition , fuel, food and salaries.
Money, supplies and aid from Pakistan, Russia and Iran also bolstered their ranks, analysts said.
And each victory contributed to a growing sense of inevitability that the Taliban would eventually prevail.