The Taliban appear to have the "strategic momentum" in their sweeping offensives across Afghanistan, but their victory is far from assured, the chairman of the US joint chiefs of staff General Mark Milley said Wednesday.
Nearly 20 years after the US toppled the Taliban regime in the wake of the 9/11 attacks, and with the withdrawal of American-led foreign forces all but complete, the resurgent militants now control about half of Afghanistan's roughly 400 districts.
But they have none of the country's densely populated main cities, Milley told a press conference.
With the militants putting pressure on around half of the country's provincial capitals, Afghan troops are "consolidating their forces" to protect those major urban centres, he added.
"They're taking an approach to protect the population, and most of the population lives in the provincial capitals and capital city of Kabul," Milley said.
"A Taliban automatic military takeover is not a foregone conclusion."
The Taliban are surging across Afghanistan, snapping up territory, seizing border crossings and encircling cities.
Their success has tested the morale of the Afghan army, already battered by years of shockingly high casualties and, more recently, the decision by international troops to leave.
Though the Afghan army has been trained and equipped by international forces, and estimates show it vastly outnumbers the Taliban's ranks, Milley said numbers are not all it takes to win a war.
"The two most important combat multipliers actually are will and leadership. And this is going to be a test now of the will and leadership of the Afghan people, the Afghan security forces and the government of Afghanistan," he said.
US President Joe Biden has also said that a Taliban takeover is "not inevitable."
But earlier this month he also warned that Afghans must come together against the insurgents, and admitted it was "highly unlikely" that one unified government would end up controlling the entire country.
- End game 'not yet written' -
The US has insisted it will continue supporting the Afghan army.
Defence Secretary Lloyd Austin said the United States handed over three Blackhawk helicopter gunships to the Afghan army on Friday and that more equipment would follow.
He added that US units had been positioned in Qatar to keep fighting jihadists in Afghanistan after the withdrawal.
"We remain committed to helping the Afghan security forces and the Afghan government going forward," he said.
The State Department also said a first group of around 700 Afghans who worked for the US army -- making them targets for the Taliban -- will arrive in the United States next week with their immediate families.
Another 4,000 workers and their families, totalling some 20,000 people, have been cleared to receive immigrant visas, State Department official Tracey Jacobson said.
Milley said US withdrawal is 95 percent complete, with the evacuation of equipment equivalent to the cargo of 984 C-17 aircraft.
His comments came hours after the Taliban said Wednesday they would fight only to defend themselves over the Eidul Azha, but stopped short of declaring a formal ceasefire.
The militants have said they "strenuously favor" a political settlement to end the war with the government in Kabul.
But their push to capitalize on the withdrawal has left many Afghans sceptical.
President Ashraf Ghani said Tuesday the Taliban had proved "they have no will and intention for peace," and more than a dozen diplomatic missions in Kabul this week called for "an urgent end" to the offensive.
Afghan civilians, who have long taken the brunt of the fighting, are also watching the Taliban advance in fear.
Many -- especially women and minorities -- stand to lose hard-won rights and freedoms if the militants return to any form of power.
Even if Kabul can hold them off, civilians face the possibility of a protracted and bloody civil war or the country fracturing along ethnic lines.
Milley said the chance of a negotiated political settlement is "still out there."
"There's a possibility of a complete Taliban takeover or possibility of any number of other scenarios -- breakdowns, warlordism, all kinds of other scenarios out there," he said.
"We're monitoring very closely. I don't think the end game is yet written."