The Western-backed Afghan government is locked in a prolonged war with Taliban insurgents as well as other militant groups.

Taliban spokesman Zabihullah Mujahid said the fighters set off an explosion, allowing suicide bombers armed with small arms to breach the base. “Our fighters have inflicted heavy casualties on the Afghan army stationed there,” he said.

The base is the headquarters for the Afghan National Army's 209th Corps, which covers most of northern Afghanistan, including Kunduz province where there has been heavy fighting.

A number of German and other foreign soldiers are based in Mazar-i-Sharif, including about 70 who advise the corps headquarters as part of a Nato-led multinational mission to advise and train the Afghan security forces.

The German military said no German or international troops were involved in the attack.