General Sami Sadat is leading the battle against the Taliban in the southern province of Helmand, where intense fighting has broken out in its capital Lashkar Gah.
At least 40 civilians have been killed there in the past day, the UN says.
The Taliban are reported to have captured most of the city.
However, the fighting is continuing and government forces have vowed not to let Lashkar Gah fall into militant hands.
Gen Sadat told the BBC that while government forces had lost ground, he believed the Taliban would be unable to sustain their assault.
However, he said the Taliban were being reinforced by fighters from other Islamist groups and warned that their gains posed a threat beyond Afghanistan.
“This will increase the hope for small extremist groups to mobilize in the cities of Europe and America, and will have a devastating effect on global security,” he said.
“This is not a war of Afghanistan, this is a war between liberty and totalitarianism.”
The Taliban assault in Helmand province is part of a major offensive across Afghanistan.
Helmand was the centerpiece of the US and British military campaign, and any Taliban gains there would be a blow for the Afghan government.
If Lashkar Gah fell, it would be the first provincial capital won by the Taliban since 2016, when they briefly held the northern city of Kunduz.
‘Corpses on the roads’
Residents of Lashkar Gah say they are living in fear as the city faces heavy assault from the militants, who are being targeted with US and Afghan air strikes.
“Neither the Taliban will have mercy on us nor will the government stop the bombing. There are corpses on the roads. We do not know if they are civilians or the Taliban,” one resident told the BBC.
Another said: “I do not know where to go, there are clashes in every corner of the city.”
The United Nations Assistance Mission in Afghanistan (Unama) says civilians are “bearing the brunt” of the fighting, with the Taliban ground offensive and Afghan air strikes causing the most harm.
In addition to the fatalities, dozens of people have been injured and thousands displaced, according to Unama.
Doctors in Lashkar Gah have reported being overwhelmed and running low on supplies. “There is fighting all around,” one told the BBC.
An Afghan interpreter living in the city said his life was under threat from the Taliban because he had worked for the British forces.
“My own house which I left yesterday has been captured by the Taliban and they are living there and they were asking for me,” he said.
“We don’t know what will happen in [the] future but they are looking from house to house to find the people who worked for Nato.”
Meanwhile, officials in the city said Afghan forces had recaptured the office of the state TV and radio station, which had previously been seized by the Taliban. (BBC)