The Taliban Monday largely seized a major Afghan city, storming government compounds and sending panicked residents fleeing, as the Islamists for the first time breached a provincial capital since being ousted from power in 2001.
Fierce fighting raged in the northern city of Kunduz as marauding insurgents freed hundreds of prisoners from the local jail, set government buildings on fire and hoisted their trademark white flag over the homes of officials.
The Taliban's incursion into Kunduz barely nine months after the NATO combat mission ended marks a major psychological blow to the country's Western-trained security forces.
"The Taliban have taken the city but our forces are still putting up resistance in some areas," Kunduz police spokesman Sayed Sarwar Hussaini told AFP, adding that promised reinforcements from Kabul were awaited.
Scores of bodies littered the streets after hours of heavy fighting, Afghan media reported citing local residents, many of whom were making a hasty exit from Kunduz.
Many were fleeing to the city's main airport, which is still in government control, but some complained they were being turned away by security forces.
The city was swarming with Taliban fighters racing police vehicles, who overran the governor's compound and the local police headquarters.
The local headquarters of the National Directorate of Security, the country's main intelligence agency, was set on fire, a security official told AFP on condition of anonymity.
Saad Mukhtar, head of a 200-bed government hospital, said the Taliban had control of the building and were hunting for wounded Afghan troops.
"Yes, the enemy is in the city and they have taken over the prison and other buildings, but reinforcements will be deployed and the city will be taken back," interior ministry spokesman Sediq Sediqqi told AFP.
The new Taliban leader Mullah Akhtar Mansour in a statement congratulated his cadres over the "major victory".
This was the group's third attempt this year to breach the city, which coincides with the first anniversary of President Ashraf Ghani's national unity government in power.
The Taliban's ability to penetrate the city is a major setback for Afghan forces who have been battling the militants without the full support of NATO, which ended its combat mission last December.
The Islamist group has been largely absent from cities since being driven from power by the US and its allies, but has maintained often-brutal rule over swathes of the countryside.
A senior tribal elder in Kunduz, 150 miles (250 kilometres) north of Kabul, said the militia had control of one of the city's districts, while a second elder added his house was now around 100 metres (yards) from their forward line.
Federal government officials had earlier issued strong denials that the Taliban had breached the city, insisting they were repelling the insurgents on the city's outskirts.
The Taliban have been waging a bloody insurgency since a US-led invasion booted them from power in late 2001, and have stepped up attacks during a summer offensive launched in late April against the Western-backed government in Kabul.
On Sunday 13 people were killed and 33 wounded at a volleyball match in the eastern province of Paktika.
The Taliban denied being behind the attack in Paktika, a volatile frontier region considered a stronghold of their allies the Haqqani network.
Meanwhile, Afghanistan's thinly spread security forces are increasingly having to deal with the threat from the self-styled Islamic State group, which is looking to make inroads in the troubled country.
At the weekend, it launched coordinated attacks on police checkpoints in the eastern province of Nangarhar, killing at least three officers.
The two groups -- both with their blood-curdling brand of Islamic fundamentalism -- are seen as engaged in a contest for influence in Afghanistan.
After years of costly involvement, most NATO troops pulled back from the frontlines by the end of 2014, although a residual force of around 13,000 remains for training and counter-terrorism operations.
Peace overtures by the government of President Ghani over the summer ended in failure, as civilian casualties soared to a record high in the first half of 2015 according to a UN report.
It said 1,592 civilians were killed, a six percent fall over last year, while the number of injured jumped four percent to 3,329.