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 US-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 centers, 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 US-led international troops to leave.
Though the Afghan army has been trained 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 that it was "highly unlikely" that one unified government would end up controlling the entire country.
Milley's comments came hours after the Taliban said Wednesday they would fight only to defend themselves over the Muslim holiday of Eid al-Adha, but stopped short of declaring a formal ceasefire.
In recent years, the militants have declared a pause in fighting with government forces over Islamic holidays, offering a brief respite to Afghans who can visit family in relative safety.
Taliban leader Hibatullah Akhundzada said over the weekend that he "strenuously favors" a political settlement to end the war with the government in Kabul.
But the hardline Islamist movement's push to capitalize on the last stages of the international withdrawal has left many Afghans sceptical.
President Ashraf Ghani said Tuesday that the Taliban had proved "they have no will and intention for peace," with negotiations between the two warring sides achieving little.
More than a dozen diplomatic missions in Kabul this week called for "an urgent end" to the Taliban's current offensive, saying it was at odds with claims they want to secure a political deal to end the conflict.
Afghan civilians, who have long taken the brunt of the fighting since 2001, 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, among the scenarios that civilians face is the prospect of a protracted and bloody civil war and the possibility of the country fracturing along ethnic lines.
It was the chaos of the civil war in the 1990s that helped usher the Taliban to power.
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."