Afghan soldiers have described carrying their wounded comrades across the border to Tajikistan after being abandoned by their commanders when the Taliban seized a key border crossing.

The soldiers -- part of a group of more than 1,000 who fled to Tajikistan when the insurgents took Shir Khan Bandar at the end of June -- were talking to AFP this week after being flown back to Afghanistan.

As they spoke the Taliban were making sweeping advances across Afghanistan, and now claim to be in control of 85 percent of the country.

Their latest offensive started in early May as the United States and NATO began the final troop withdrawal following a 20-year occupation sparked by the September 11 attacks.

The Taliban and government were supposed to have agreed a political roadmap for the country at peace talks in Doha, but they have largely fizzled out after months of deadlock, and the insurgents appear now to have their sights set on a military victory.

The Taliban advances have raised fears Afghan security forces may swiftly become demoralised without the vital air support provided by the Americans, and collapse.

Afghan security forces stand guard along a road in Kunduz on June 22, 2021
Afghan security forces stand guard along a road in Kunduz on June 22, 2021 AFP / STR

Mehrullah, who like many Afghans uses only one name, was part of a battalion of around 1,000 soldiers defending the border crossing with Tajikistan near Kunduz city, in the far north.

"We were under siege in Shir Khan Bandar for a week. Our supply route was cut off," said the 27-year-old, who spoke of confusion and a lack of communication between units on the ground.

As the fighting intensified, Mehrullah said some commanders abandoned their positions, leaving the foot soldiers little choice but to follow them.

"If there was proper coordination between the centre and the leadership of the port forces we would have fought the Taliban instead of retreating," he said.

Map of Afghanistan locating Shir Khan Bandar, the main border crossing with Tajikistan.
Map of Afghanistan locating Shir Khan Bandar, the main border crossing with Tajikistan. AFP / STAFF

"We did not leave the port, but the commanders fled before the soldiers."

Ainuddin, another soldier, told how wounded troops were carried into Tajikistan by their comrades as the Taliban tightened their noose around the border crossing.

Tajikistan authorities said that 1,037 Afghan government troops had crossed into the former-Soviet country, and they had offered them sanctuary and treated their wounds in order to "save their lives".

"After the siege of the port and a big Taliban attack, they cut off all roads to Kunduz," Ainuddin said.

"We were forced to retreat to the bridge and, after an hour of fighting, we crossed into Tajikistan."

Afghan officials acknowledge supply lines are stretched and that they have lost territory to the Taliban, but say they are losing battles, not the war.

"There is war, there is pressure. Sometimes things are working our way. Sometimes they don't," said National Security Adviser Hamdullah Mohib.

Both soldiers said they were very well treated by Tajik officials, who fear a radical Islamic southern neighbour could foment unrest in its moderate Muslim population.

"After spending two days there we were flown back to Kabul," said Ainuddin.

The two soldiers are now at a military base in the Afghan capital, and say they are willing to rejoin the battle.

"We are ready to report back on duty wherever the government wants," said Ainuddin.