The US military has completed more than 90% of its withdrawal from Afghanistan.

In a statement, US Central Command said the United States had officially handed over seven facilities to the Afghan Ministry of Defense.

The US withdrawal was ordered in April by President Joe Biden and underscores that Afghan forces are increasingly on their own in the battle with the Taliban.

Afghan authorities have vowed to retake all the districts lost to the insurgents with hundreds of commandos being deployed to counter the offensive in northern Afghanistan, a day after more than 1,000 government troops fled into neighbouring Tajikistan.

Fighting has raged across several provinces, but the Taliban has primarily focused on a campaign across the northern countryside, seizing dozens of districts in the past two months.

Last week, all United States 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 11 September 2001 attacks.

"There is war, there is pressure. Sometimes things are working our way. Sometimes they don't, but we will continue to defend the Afghan people," National Security Adviser Hamdullah Mohib told reporters.

"We have plans to retake the districts," he added.

An Afghan soldier surveys belongings left by the US military in Bagram

Troops and pro-government militiamen were deployed in the northern provinces of Takhar and Badakhshan where the Taliban has captured large swathes of territory at speed, often with little resistance.

Afghan defence officials have said they intend to focus on securing major cities, roads and border towns in the face of the Taliban onslaught, launched as US and NATO troops pressed ahead with their final withdrawal in early May.

The militants' rapid gains have spurred fears that Afghan forces are facing a spiralling crisis, particularly now that vital US air support has been curtailed by the handover of Bagram Air Base.

Mr Mohib acknowledged that the Afghan air force was stretched and largely unable to support bases that were in remote districts.

But he said the air force was now being reorganised and would offer the needed backup to troops on the ground.

"We had some glitches as a result of the (US) retrograde ... (that put) additional pressure on the Afghan air force, he said.

"Next week we will receive seven Black Hawks" as part of Washington's continued support of Afghan forces, he added.

President Ashraf Ghani blamed the Taliban for all the "bloodshed and destruction", adding that his government will not "surrender" to the militants, a palace statement said.

An Afghan soldier stands guard at a checkpoint on a road near Bagram Air Base

Yesterday, more than 1,000 Afghan troops fled into Tajikistan, forcing the neighbouring country to bolster the frontier with its own soldiers.

Several hundred Afghan troops had already crossed into Tajikistan in recent weeks.

"We had to abandon our base because there was no coordination or interest among our commanders to counter the attack," said Mohammad Musa, a soldier who had fled to Tajikistan after his base in Kunduz province fell to the Taliban last week.

The fighting in the north has also forced Russia to close its consulate in the city of Mazar-i-Sharif, the capital of Balkh province and one of Afghanistan's largest urban centres, near the border with Uzbekistan.

But Mr Mohib said the soldiers who fled were returning and rejoining the security forces.

"They may have abandoned their posts because they ran out of ammunition or they ran out of supplies, but by no means has anyone defected to the Taliban," he said.

'Trying our best' - Afghan commander

The speed and ease of the Taliban's effective takeover of areas in Takhar, Badakhshan and Kunduz represent a psychological blow to the Afghan government.

The district once served as the stronghold for the anti-Taliban Northern Alliance during the civil war in the 1990s and was never routed by the militants.

A psychological war has also been taking shape online.

The Taliban has marshalled its forces on social media, with insurgent-affiliated accounts providing live updates of the fall of districts and posting numerous videos of Afghan soldiers surrendering and handing over weapons caches and equipment to the group.

The Afghan government in turn has been releasing its own footage on social media - mostly grainy black and white videos of air strikes obliterating alleged Taliban positions, while boasting of inflicting heavy casualties on the jihadist group.

Afghan commander General Mirassadullah Kohistani, who is now in charge of Bagram Air Base following the US exit, put on a brave face when asked about the insurgents' rapid advances.

"We are trying to do the best and as much as possible secure and serve all the people," he said.