Afghan security forces have cleared Kunduz of Taliban fighters, an official said. (File image)

Afghan security forces have cleared Kunduz of Taliban fighters, an official said this morning, one day after insurgents assaulted the northern Afghanistan city.

The multi-fronted attack on Saturday saw Taliban fighters try to overwhelm Kunduz from several directions in a bid to capture the strategically important city near the Tajik border.

After heavy fighting that included US air support, interior ministry spokesman Nasrat Rahimi told AFP on Sunday that the city was free of Taliban.

"Kunduz city has been cleared, Taliban pushed back from areas they had taken," Rahimi said.

"The situation is back to normal in the city.

But Taliban spokesman Zabihullah Mujahid disputed the claim, saying insurgents were holding onto their positions.

The "enemy's propaganda about expelling mujahideen or killing them is untrue," he told journalists.

The attack occurred even as US and insurgent negotiators were seeking an agreement in Doha that would see thousands of American troops leave Afghanistan in return for security guarantees.

Early Sunday morning, Washington's special envoy to Afghanistan Zalmay Khalilzad said the two foes were on the brink of a deal.

"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," Khalilzad said on Twitter.

In late September 2015, the Taliban attacked Kunduz, overwhelming local forces and briefly seizing the city. It was only through extensive US air support that the Taliban were repelled.

The event garnered particular global attention after a US gunship struck a hospital run by Medecins Sans Frontieres (Doctors Without Borders), killing dozens of patients and staff.

The fall of Kunduz also underscored the vulnerability of Afghan security forces and played a role in stopping the pull-out of US forces under president Barack Obama.

Since then the city has come under frequent Taliban attack, but the insurgents have been unable to repeat a full capture.