Government forces have taken back control of police headquarters and other key facilities and are clearing the city of Taliban fighters, Afghan Defence Ministry says.

Afghan security personnel stand guard along a road amid ongoing fight between government forces and Taliban in western city of Qala-e- Naw, capital of Badghis province, on July 7, 2021.
Afghan security personnel stand guard along a road amid ongoing fight between government forces and Taliban in western city of Qala-e- Naw, capital of Badghis province, on July 7, 2021. (AFP)

Regional officials in northern Afghanistan have said that they have recaptured government buildings in a provincial capital after Taliban fighters stormed it, taking over the police headquarters and sparking panic among residents.

Officials said air strikes on Wednesday were being carried out and special forces had been deployed to push the Taliban fighters back from Badghis province's main city , after the latest dramatic advance by fighters surging across the country as Washington pulls out its last troops.

Provincial governor Husamuddin Shams told Reuters news agency the Taliban had attacked the city of Qala-e-Naw from three directions in the morning and Afghan security forces were fighting them back.

"They entered some parts of the city, but later on the enemy was faced with a strong reaction," he said.

'Advancing and driving the enemy out'

Video footage obtained by Reuters news agency showed smoke over the city.

Speaking on a street as gunfire could be heard in the background, a special forces commander, Sayed Nezami, said troops had "cleared the area of the enemy. The enemy suffered heavy casualties and now we are advancing and driving the enemy out of the city."

A Ministry of Defence official said on condition of anonymity that the insurgents had taken control of the provincial office of the National Directorate of Security (NDS) and police headquarters, and were attempting to take over the governor's office before special forces pushed them back.

"They were inside the city and the city briefly collapsed," said the official.

Fawad Aman, Deputy Spokesman for the Ministry of Defence, said government forces had managed to take back control of the police and NDS offices and within the next few hours they expected to clear the city of Taliban fighters.

Prisoners escape in Qala-e-Naw

Abdul Aziz Bek, head of Badghis' provincial council, said that Afghan forces began air strikes against Taliban fighters during the afternoon.

Earlier, he described panic: "Qala-e-Naw was in a state of disarray as security forces and people do not know what to do now," he said.

"More than 200 prisoners in the central prison of the Badghis broke the prison gate and escaped."

The prospect of a Taliban victory is alarming for millions of urban Afghans, particularly women and girls who were banned from school or most work under their rule. 

The Taliban says it has changed, but many remain sceptical.

As foreign forces withdraw, Taliban fighters have been swiftly gaining ground across towns in the north and western provinces, forcing soldiers to surrender and civilians to flee.

The insurgents have been advancing for weeks, an offensive that has accelerated as the United States pulled out of its main base, effectively ending its two-decade intervention.

Taliban gains have been especially dramatic in northern provinces where they had long been kept at bay.

Shams said other districts of Badghis outside the capital were in the hands of the Taliban as security forces evacuated.

Afghan Defence Minister Bismillah Mohammadi said in a statement the war was entering a "difficult" stage and security forces were "defending Afghanistan and our compatriots with all their might and resources under all circumstances".

Talks between Afghan government and Taliban negotiators in Qatar have failed to make substantive progress, though the warring sides have been holding meetings in recent days.

READ MORE: Fighting between Afghan govt troops and Taliban rages on

Iran talks

Also on Wednesday, an Afghan government delegation met with Taliban representatives in Tehran, the Iranian Foreign Ministry said.

Opening the Tehran talks, Iran's Foreign Minister Mohammad Javad Zarif welcomed the departure of the US from its eastern borders but warned, "Today the people and political leaders of Afghanistan must make difficult decisions for the future of their country".

Leading negotiator Sher Mohammad Abbas Stanikzai headed the Taliban delegation while former vice president Younus Qanooni represented the government, the ministry said.

READ MORE: The Taliban is convincing Afghan forces not to fight them

Taliban spokesman Zabihullah Mujahid confirmed Stanikzai's visit to Tehran to "discuss issues of mutual interest".

But he made no reference to any Afghan government delegation, saying only that Stanikzai was holding talks with "some Afghan personalities".

"They will discuss and exchange opinions on the current situation of the country and finding a solution through talks," Mujahid added.

In his opening remarks, the Iranian foreign minister hailed the "defeat" of US troops after two decades of war that had caused "extensive damage" but warned of the "unfavourable results of continuing the conflict".

US and NATO exit

The United States, which toppled the Taliban for sheltering Osama bin Laden in 2001 and has since propped up the Kabul government, agreed under then-president Donald Trump last year to pull out its troops subject to Taliban security guarantees.

Trump's successor, Joe Biden, rejected advice from generals to hold on longer so that the government could make a political deal with the Taliban. 

US troops pulled out of their main base at Bagram airfield north of Kabul on Friday, days after their commander warned of a possible civil war without them.

The assault in Qala-e-Naw comes hours after the Pentagon confirmed that their pullout was more than 90 percent completed.

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.

READ MORE: Pentagon: US troop pullout from Afghanistan over 90% complete

Source: TRTWorld and agencies