Afghan lawmakers have called on President Ashraf Ghani to resign over his government's "shameful" handling of the battle for Kunduz, the northern city which has fallen to Taliban insurgents in their biggest victory so far in 14 years of war.

The Islamist militants seized control of Kunduz after an audacious assault on the city on Monday, and the promised counter-offensive from Afghan forces has yet to materialise.

Instead, thousands of exhausted Afghan police and soldiers are holed up at the city's airport waiting for reinforcements from other parts of the country.

"It is shameful how they (the government) have dealt with the situation in Kunduz," said Iqbal Safi, a member of parliament from Kapisa province.

"Ghani and Abdullah must step down," he added, referring to Ghani's Chief Executive Abdullah Abdullah.

Kunduz was the last city to fall when the Taliban fell in 2001, and, in the biggest blow to Mr Ghani since he came to power a year ago, it has become the first major city to be retaken by the insurgency since then.

Other lawmakers echoed Mr Safi's demands in a chaotic session, with parliamentarians shouting and calling for a gathering of elders to begin the process of impeachment.

Mr Ghani's first year in office has been clouded by political infighting and escalating violence around the country, with the UN recording almost 5,000 civilian casualties in the first half of the year.

Sayed Zafar Hashemi, Mr Ghani's deputy spokesman, said it was parliamentarians' right to protest.

He added: "For the president, the first priorities are the safety of the citizens in Kunduz and clearing the area of terrorists."

He said Afghan troops were making progress, and Mr Ghani had ordered an investigation into how Kunduz fell so quickly.

Around 5,000 Afghan troops were gathered at Kunduz airport on Wednesday after fighting there raged late into the night, an Afghan security official said, and Taliban fighters were driven back with the help a second US air strike.

However, the morale of Afghan troops was flagging after two days of continuous fighting, a district official said.

"We still have enough forces to take on the Taliban but sadly there is no will or resolve to fight," said Mohammad Zahir Niazi, chief of Chardara, a district in Kunduz.

"We are only defending."

Hundreds of Afghan security forces sent to reinforce them were stuck in neighbouring Baghlan province as Taliban fighters blocked roads with large stones and sandbags, a senior Afghan security official said.