Taliban fighters overran a northern Afghan army base, officials said Tuesday, killing at least 14 soldiers with dozens feared captured in a stinging blow to security forces already struggling to push insurgents from eastern Ghazni.

The fall of the base in Ghormach district of volatile Faryab province came with security forces who have struggled to hold back the Taliban since NATO combat troops pulled out in 2014 already stretched by the days of fighting in Ghazni, a strategic provincial capital two hours from Kabul.

Militants gained control of the base after days of heavy fighting, according to army spokesman for northern Afghanistan Mohammad Hanif Rezaee.

He said around 100 soldiers were on the base when it was first attacked Sunday.

"It is a tragedy that the base fell to the enemy. Some soldiers were killed, some captured and some fled to nearby hills," Rezaee told AFP.

Faryab MP Hashim Otaq said that 14 soldiers were killed and about 40 others were captured by Taliban fighters in the base, known as Chenaya.

Tahir Rehmani head of Faryab's provincial council said the base fell after the soldiers begged for reinforcements and air support from Kabul but were ultimately ignored.

"They were too busy with Ghazni," said Rehmani.

The city, which the Taliban first assaulted late Thursday, remains in government hands, officials have said.

But the insurgents appeared entrenched there Tuesday, according to residents who said they were burning buildings, killing civilians and firing on security forces conducting a clearing operation.

Afghan security forces, beset by killings, desertions and under intense pressure, have been struggling to beat back insurgents since US-led NATO troops ended their combat mission in December 2014.

The attack on Ghazni is the largest tactical onslaught by the Taliban since an unprecedented truce in June brought fighting between security forces and the Taliban to a brief stop, providing battle-worn Afghans some welcome relief.

Analysts have said the insurgents may be seeking to demonstrate strength as they come under increasing pressure since the ceasefire to join peace talks.

Ghost city

Fears were growing of civilian casualties in Ghazni as Afghan security forces backed by US airpower struggled to push the Taliban out on the fifth day of fighting.

The United Nations said unverified reports put civilian casualties at more than 100, with residents also at risk from several days of US airstrikes.

An MP from Ghazni, Shah Gul Rezaye, said Tuesday that some parts of the city had been cleared.

But in others "the Taliban have positioned their fighters in high buildings shooting at security forces from there", he added.

Communication networks remained largely down, making any information difficult to verify.

"Ghazni is a ghost city now. The Taliban are going from house to house to find government officials or their relatives to kill," said one resident, Sayed Zia.

"Those who can are fleeing."

Another resident also said the Taliban were killing civilians who refused to help them.

"I saw two trucks full of coffins going toward a cemetery in the city. They all seemed to be civilians," said Abdullah, who asked to only use one name.

"The city is full of smoke. Everywhere they go they set the places on fire," he said, adding that shops were being looted, with water and food scarce.

Other residents have told AFP of bodies littering the streets of the city in recent days.

"So far the fighting has reportedly resulted in 110 to 150 civilian casualties. The numbers still need to be verified," said a report by the UN Office for the Coordination of Humanitarian Affairs.

Reports the Taliban are hiding in residents' homes and marketplaces "heightened the risk of civilian casualties arising from any military aerial response", the UN warned.

Bombs placed along the road leading north and south from the city also "prevented civilians from safely fleeing the violence", it said.

On Monday the Afghan defence minister said at least 100 security forces had been killed in the fighting so far, and "20-30" civilians.

Ghazni lies along the major Kabul-Kandahar highway, effectively serving as a gateway between Kabul and the militant strongholds in the south.