KUNDUZ, Afghanistan (AFP) - The Taleban 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 Taleban'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 Taleban have taken the city but our forces are still putting up resistance in some areas," said Kunduz police spokesman Sayed Sarwar Hussaini, 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.
Kunduz was swarming with Taleban fighters racing police vehicles, who officials said 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.
Dr Saad Mukhtar, head of a 200-bed government hospital, said the Taleban 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," said interior ministry spokesman Sediq Sediqqi.
But by nightfall many Afghan soldiers retreated to the main airport on the outskirts of Kunduz, leaving the Taleban within tantalising reach of a military goal that has so far eluded the insurgents - the capture of a major city.
The fall of Kunduz will undoubtedly boost the image of new Taleban leader Mullah Akhtar Mansour within insurgent ranks as he seeks to drive attention away from internal rifts over his leadership.
In a statement late Monday, he congratulated his cadres over the "major victory".
"As fighting rages in Kunduz, all sides must ensure that civilians and civilian objects are protected according to international humanitarian law," Amnesty International said in a statement. "Reports that the Taleban have already sent armed fighters into a public provincial hospital are extremely worrying."
This was the group's third attempt this year to breach Kunduz city, which coincides with the first anniversary of President Ashraf Ghani's national unity government in power.
The Taleban's ability to penetrate the city raises troubling questions over the capacity of Afghan forces as they battle 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, 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 from their forward line.
Federal government officials had earlier issued strong denials that the Taleban had breached the city, insisting they were repelling the insurgents on the city's outskirts.
The Taleban 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 Taleban 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 bloody 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.