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 has said.
The militants now control about half of Afghanistan's roughly 400 districts, but none of the country's densely populated main cities, Mr Milley told a press conference.
Afghan security forces 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," Mr Milley said.
"A Taliban automatic military takeover is not a foregone conclusion."
Though the Afghan army has been trained and equipped by the United States, and estimates show it vastly outnumbers the Taliban's ranks, Mr 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.
The Taliban are surging across Afghanistan, snapping up territory, seizing border crossings and encircling cities, with the withdrawal of US-led foreign troops all but complete.
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.
Mr Milley's comments came hours after the Taliban said 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.
President Ashraf Ghani said yesterday that the Taliban had proved "they have no will and intention for peace," with negotiations between the two warring sides achieving little.