Afghanistan’s warlords are taking up arms again to battle the Taliban as the Islamist insurgents capture swaths of territory in the final stages of the US withdrawal.

Taliban forces are making rapid gains and launching assaults on strategic cities and towns, including Kandahar in the south and Qala-e-Naw in the north-west, threatening to reverse the hard-won freedoms of the 20-year US war.

The insurgents say they have captured 85 per cent of the country’s territory. While the Afghan government has dismissed that claim as propaganda, the unrelenting Taliban offensive in the wake of the departure of US and international forces has left ordinary Afghans fearful.

In 2001, the US teamed up with the Northern Alliance, a coalition of Afghan militia leaders, to drive the Taliban out of Kabul. Two decades later, the warlords are calling for a “second resistance” against the Islamist onslaught.

The urgency has intensified as the Taliban toppled district after district, sparking fears that the country will descend into chaos. The national government in Kabul is increasingly pessimistic about reaching a peaceful political settlement with the Taliban as envisioned by Washington.

With great powers jostling to secure their strategic interests in Afghanistan, the commanders are competing for political prominence, said Avinash Paliwal of the Soas South Asia Institute at the University of London.

“Their political value has risen for outside powers as the US leaves,” said Paliwal. “Now, the powers have to deal with them [the warlords] directly.”

That strategic outreach started last year. In September, India’s foreign minister S Jaishankar hosted Abdul Rashid Dostum, an ethnic Uzbek who has served as a former pro-Soviet fighter, anti-Taliban commander and Afghanistan vice-president.

Dostum, who has been living in Turkey and is backed by Ankara, is determined to fight again. “We will come to the north, it is our home,” declared Dostum last month. “I will be proud if I am killed and martyred there.”

The growing chorus for the mobilisation and the resurrection of militia groups has been stoked by warlords including Ahmad Massoud, the son of an influential commander killed by al-Qaeda, and Atta Mohammad Noor, a former governor and northern commander.

With demoralised Afghan security forces suffering repeated defeats on the battlefield, Kabul has launched a “National Mobilisation” drive to arm local volunteers.

US president Joe Biden insisted on Thursday that America’s military mission would end by August. That same week, US forces left Bagram air base in the middle of the night, leaving it vulnerable to looters who ransacked it.

Facing the imminent threat of a Taliban takeover, Afghans are fleeing the country. Emomali Rahmon, president of Tajikistan, sent 20,000 military reservists to guard its border last week after 1,000 Afghanistan security personnel fled across the frontier.

“The weaker the government gets, the more the warlords will be able to remobilise,” said Romain Malejacq, author of Warlord Survival: The Delusion of State Building in Afghanistan. “People may not like them, but they are the safest bets.”

In the weeks since the US and its allies accelerated their withdrawal, the Taliban has targeted northern districts in what appeared to be a pre-emptive strike on anti-Taliban strongholds, said Kate Clark from the Afghanistan Analysts Network.

Since May, the Taliban have taken control of more than 40 per cent of the country’s 400 district centres, according to Clark.

She said it was unclear whether the warlords would be able to mount an effective fightback against the Taliban. “We don’t know the capacity for actual popular mobilisation,” she said. “There is so much that is up in the air at the moment.”

Ahamdi, a former fighter for Dostum in the northern Takhar province who asked to be identified by only his first name, said that while Uzbeks, one of the ethnic groups in Afghanistan, were loyal to Dostum, many fighters had switched sides to the Taliban.

“So many Uzbeks have become Taliban and know where to hit Dostum in his native places,” said the 60-year-old. “I’m worried for my own security and life.”

Haji Rozi Baig, an Afghan elder in the Khwaja Bahauddin district of Takhar, the former headquarters of the Northern Alliance that fell to the Taliban in June, said most people felt it was inevitable that the militants would conquer the entire country.

“Under government control, we were happy and at least enjoyed some freedom,” said Baig. “Since the Taliban took over, we feel depressed. At home, we can’t speak loudly, can’t listen to music and can’t send women to the Friday market.

“They are asking about family members. The [Taliban] sub-commander said you should not keep girls over the age of 18; it’s sinful, they must get married,” said the 55-year-old elder.

“I’m sure the next day they will come and take my 23 and 24-year-old daughters and marry them by force.”