A Taliban attack killed at least 21 people in northern Afghanistan, officials said Sunday, after a wave of lethal bombings in the capital as the insurgency escalates following a bitter power transition.

The Afghan interior ministry said all those killed yesterday evening in the Khanabad district of Kunduz province were civilians, although local officials called them anti-Taliban militiamen.

The Taliban claimed responsibility for the attack, which comes after a barrage of bombings in Kabul killed at least 51 people on Friday, the deadliest day for the capital in years.

"The incident took place (when) a suicide bomber detonated his suicide vest in Khanabad district," the interior ministry said, strongly condemning the "heinous act".

"The suicide attack... resulted in martyrdom of 21 civilians and wounding of 10 others."

But Abdul Wadood Wahidi, spokesman for the governor of Kunduz, said 22 militiamen including four of their commanders were killed by an improvised explosive device.

Kunduz is a volatile province where the Taliban recently came close to overrunning Kunduz city, in the most alarming threat to any provincial capital since the 2001 US-led invasion of Afghanistan.

The insurgency has been rapidly spreading across the north from its traditional southern and eastern strongholds, with Afghan forces increasingly battling the militants on their own.

US-led NATO forces ended their combat mission in Afghanistan in December last year, although a 13,000-strong residual force remains for training and counter-terrorism operations.

The bombings on Friday in Kabul struck near an army complex, a police academy and a US special forces base, killing at least 51 people, officials said.

They were the first major attacks since Mullah Akhtar Mansour was named as the new Taliban chief last week in an acrimonious power transition after the insurgents confirmed the death of longtime leader Mullah Omar.