We are at the threshold of an agreement that will reduce violence, tweets US envoy to Afghanistan

US and Taliban negotiators are "at the threshold of an agreement" to end 18 years of conflict between them, Washington's top negotiator said Sunday as he concluded their latest talks.

The foes have been meeting in Doha to conclude a deal under which the Taliban would give security guarantees in return for sharp reductions to the 13,000-strong US force in Afghanistan.

"We are at the threshold of an agreement that will reduce violence and open the door for Afghans to sit together to negotiate an honourable and sustainable peace," tweeted Washington's special envoy to Afghanistan Zalmay Khalilzad.

Khalilzad added that he would travel to Kabul later Sunday "for consultations" following the end of the eighth and final day of the latest round of talks.

US troops were first sent to Afghanistan after the September 11, 2001 attacks carried out by Al-Qaeda, which was sheltered by the former Taliban regime.

Washington now wants to end its military involvement -- the longest in its history -- and has been talking to the Taliban since at least 2018.

US Secretary of State Mike Pompeo previously said he hoped a deal would be finalised before September 1 ahead of Afghan polls due later this month, and next year's US presidential vote.

The Taliban's spokesman in Doha Suhail Shaheen said Saturday that a deal "is near to finalised" but did not specify what obstacles remain to its conclusion.

The agreement will centre on the US withdrawing troops in exchange for a Taliban guarantee that Afghanistan will not be used as a jihadist safe haven.

Negotiations between the Taliban and the Afghan government, and an eventual ceasefire, will also be key pillars of any deal.

Such a deal would help foster "a unified, sovereign Afghanistan that does not threaten the United States, its allies, or any other country," Khalilzad added in his Sunday tweet.

The apparent final phase of talks follows an excruciating few months for Afghans.

The war-torn nation's people have watched on largely voiceless as US negotiators cut a deal with the Taliban while largely sidelining the government of President Ashraf Ghani.

This ninth round of talks has also progressed to a backdrop of persistent violence with the Taliban staging a brazen attack on the northern city of Kunduz on Saturday.

Afghan security forces say they have "repelled" the coordinated assault.