The Taliban launched a major assault on a provincial capital in Afghanistan on Wednesday, the first since the US military began its final drawdown of troops from the country, as insurgents press on with a blistering offensive.
Fierce fighting erupted in the western city of Qala-i-Naw, the capital of Badghis, with the militants seizing police headquarters and offices of the country's spy agency.
Afghanistan's Defence Minister Bismillah Mohammadi said government forces were in a "very sensitive military situation", adding that "the war is raging" with the Taliban.
The onslaught came just hours after Washington announced US forces on the ground had completed more than 90 percent of their withdrawal from Afghanistan, and as the Kabul government held talks with Taliban representatives in neighbouring Iran.
The militants have waged a dizzying campaign across Afghanistan since US and NATO forces announced the final withdrawal from the country in early May, seizing dozens of rural districts and stirring fears that the government is in crisis.
"The enemy has entered the city, all the districts have fallen," Badghis governor Hessamuddin Shams told reporters in a text message.
Badghis provincial council chief Abdul Aziz Bek confirmed the assault, saying some security officials had surrendered to the Taliban.
"The provincial council officials have fled to an army camp in the city. Fighting continues in the city," added Badghis provincial council member Zia Gul Habibi.
She said the Taliban had entered the city's police headquarters and the local office of the country's spy agency, the National Directorate of Security.
In a separate video message sent to reporters, Shams attempted to calm the residents of the city, even as he appeared armed with a rifle with gunfire rattling in the distance.
"My message is please keep your calm. I assure you that we will, all of us, together defend the city," he said.
- Iran talks -
As news of the attack spread, social media was flooded with videos of the fight for the city, with some videos showing armed Taliban fighters on motorbikes entering Qala-i-Naw as onlookers cheered.
The fight for the city coincided with a high-level summit across the border in Iran, where an Afghan delegation met with Taliban representatives in Tehran, according to the Iranian foreign ministry.
Opening the Tehran talks, Iran's Foreign Minister Mohammad Javad Zarif welcomed the US departure from its eastern neighbour but warned: "Today the people and political leaders of Afghanistan must make difficult decisions for the future of their country."
Last week, all US and NATO forces left Bagram Air Base near Kabul -- the command centre for anti-Taliban operations -- effectively wrapping up their exit after 20 years of military involvement that began in the wake of the September 11 attacks.
Vital US air support for the Afghan forces has been massively curtailed by the handover.
For months the Taliban have been effectively surrounding several provincial capitals across the country, with observers predicting that the militants were waiting for the complete withdrawal of foreign forces before ordering an onslaught on urban areas.
After they routed much of the north in recent weeks, the fall of Badghis would further tighten the Taliban's grip on western Afghanistan. Their forces have also inched closer to the nearby city of Herat, near the border with Iran.
If the Taliban capture Qala-i-Naw it will be of "strategic value as it creates a psychological effect of Afghan forces rapidly losing territory like dominoes against an unstoppable force", said Afghanistan expert Nishank Motwani.
Afghan defence officials have said they intend to focus on securing major cities, roads and border towns in the face of numerous Taliban offensives.
Over the years, the Taliban have launched periodic assaults on provincial capitals across the country, briefly holding urban areas before being dislodged by US airstrikes and Afghan ground forces.