Heavy fighting between Afghan security forces and Taliban insurgents that killed more than 30 combatants has threatened a major northern city.

The battle on the outskirts of Kunduz city, part of a stepped-up wave of attacks after the departure of most foreign troops, led President Ashraf Ghani to delay his departure on a state visit to India by several hours.

Officials said hundreds of Taliban insurgents had attacked police and army checkposts in the province of Kunduz, the militants' last stronghold before US coalition forces drove them from power in 2001.

Now they threaten to overrun parts of the provincial capital, after fighting that killed eight Afghan security forces and at least two dozen Taliban, a spokesman for the provincial governor said.

"The threat level is very high, but with new reinforcements, our security forces have gained morale and god willing, we will win the fight," said Abdul Waseh Basel, the spokesman.

The insurgents have overrun seven army and police checkposts in central Kunduz and two districts, Taliban spokesman Zabihullah Mujahid said.

Presidential spokesman Ajmal Obidy said Ghani left after delaying his departure for New Delhi to meet Nato's General John Campbell at the presidential palace to discuss the Kunduz fighting.

Battles were raging about four miles south of Kunduz city and insurgents also broke into the city itself, in the southern district of Gul Tepa.

Afghan security forces used artillery in defence.

"The sound of heavy weapons fired by Afghan forces can be heard in the city," said Kunduz police spokesman Sayed Sarwar Hussaini.

The Taliban, aided by foreign militants, have this month launched major attacks in another northern province, Badakhshan, and fired on a government delegation meeting armed forces there.

Insurgent rockets and gunfire narrowly missed the group, led by Ahmad Zia Massoud, head of Mr Ghani's governance commission, a close aide said.

The delegation quickly withdrew by helicopter.