The Taliban captured Afghanistan's main border crossing with Tajikistan Tuesday, officials said, with security forces abandoning their posts and some fleeing across the frontier.

The taking of the far north Shir Khan Bandar, about 50 kilometres (30 miles) from Kunduz city, was the most significant gain for the Taliban since the United States began the final stage of its troop withdrawal in May, with peace talks between the insurgents and Kabul deadlocked.

Kunduz provincial council member Khaliddin Hakmi told AFP the Taliban had taken an hour to capture the port, town and all check posts on the Tajikistan border.

"We were forced to leave all check posts... and some of our soldiers crossed the border into Tajikistan," an army officer said separately.

"By the morning, (Taliban fighters) were everywhere; hundreds of them," he told AFP on condition of anonymity.

Taliban spokesman Zabihullah Mujahid confirmed the assault, the latest in a series of gains that have alarmed the international community over prospects for peace after US and coalition forces have left.

"Most districts that have been taken surround provincial capitals, suggesting that the Taliban are positioning themselves to try and take these capitals once foreign forces are fully withdrawn," Deborah Lyons, head of UN Assistance Mission for Afghanistan, warned the Security Council.

The crossing is marked by a 700-metre US-funded bridge that opened in 2007 with the aim of boosting trade between the central Asian neighbours
The crossing is marked by a 700-metre US-funded bridge that opened in 2007 with the aim of boosting trade between the central Asian neighbours HO / US ARMY

Since early May, the Taliban have launched several major offensives targeting government forces and say they have seized at least 87 of the country's 421 districts, although many of their claims are disputed by the government and difficult to independently verify.

Three days ahead of President Ashraf Ghani's scheduled visit the White House, the United States called Tuesday for an end to the bloodshed.

"We urge the sides to engage in serious negotiations that determine a political roadmap for Afghanistan's future," State Department spokesman Ned Price told reporters.

Shir Khan Bandar, on the south bank of the Pyanj River, is marked by a 700-metre US-funded bridge that opened to great fanfare in 2007 with the aim of boosting trade between the Central Asian neighbours.

It is a sprawling dry port capable of handling up to 1,000 vehicles a day.

"There were 150 trucks loaded with goods in Shir Khan Bandar when it fell and we don't know what's happened to them," said Massoud Wahdat, a spokesman for the Kunduz provincial chamber of commerce and industries.

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

"It would be a huge financial loss."

The capture of Shir Khan Bandar, a key trade route to Central Asia, was a "significant blow" to the government, said Afghan security analyst Atiqullah Amarkhail.

"The failure to effectively defend this important port may be indicative that the government is struggling to maintain the initiative on the battlegrounds," he said.

Fierce fighting has raged across Kunduz province over the past few days, with the Taliban and Afghan forces engaged in battles Monday on the outskirts of Kunduz city itself.

The Taliban have briefly held the city twice before -- in September 2015, and again a year later.

With a significant population of Pashtun, Kunduz had been a stronghold of the Taliban even before they seized power in the 1990s.

The city's location makes it a key transit point for economic and trade exchanges with Tajikistan and beyond.

Analyst Amarkhail said recent losses, many without a fight, showed that there was "chaos and panic" among government forces.

But even when Afghan forces do take on the Taliban on the battleground they are suffering heavy losses. Last week at least 20 members of the country's top commando unit were killed in Dawlat Abad, also in the north.

Afghan government forces said they would soon launch a massive offensive to retake lost territory.

"The central command is in full control and all security forces and the military resources have been mobilized against the enemy," General Ajmal Shinwari, spokesman for the security forces, told reporters.

"You will soon witness our advances across the country."

The Pentagon said on Monday that it would complete its full withdrawal by September 11, but the pace of the pullout could be slowed given the Taliban's gains.

"We want to maintain the flexibility to do that," Pentagon spokesman John Kirby said.