Heavy fighting raged inside the key northern Afghan city of Kunduz for a third day today as government forces, backed by US air strikes, battled Taliban insurgents.

Taliban fighters seized control of Kunduz after staging an audacious assault on the city on Monday.

It is Afghan President Ashraf Ghani's biggest setback since taking office a year ago and the worst attack since the bulk of foreign troops left at the end of last year.

Kunduz was the last major city to fall when US backed Afghan forces toppled the Taliban government in late 2001.

It came weeks after the 11 September attacks on the United States that were planned by al-Qaeda leader Osama bin Laden while he was in hiding in Afghanistan.

It also became the first major city to be retaken by the Islamist insurgents since then.

Around 5,000 Afghan troops massed at Kunduz airport early today after fighting there continued 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 there, a district official said.

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

A Taliban commander acknowledged his fighters had failed to hold the airport but said the Islamist group's forces were still in control of the city.

"We actually wanted to capture the airport and organised a big attack last night," said a Taliban commander close to Mullah Akhtar Mansour, the Taliban's new leader.

"We could not seize the airport but captured some of its surroundings," he said.

A police spokesman said Afghan security forces had regained control of the police headquarters in Kunduz late last night.