A powerful Taliban truck bomb struck the German consulate in Afghanistan's northern Mazar-i-Sharif city, killing at least two people and wounding more than 100 in a major militant assault in the war-torn country.

The Taliban called it a "revenge attack" for US airstrikes in the volatile province of Kunduz earlier this month that left up to 32 civilians dead.

The huge explosion, followed by sporadic gunfire, reverberated across the usually tranquil city yesterday, smashing windows of nearby shops and leaving terrified local residents fleeing for cover.

"The suicide attacker rammed his explosives-laden car into the wall of German consulate in the city," local police chief Sayed Kamal Sadat told AFP.

German officials in Kabul declined to comment when contacted by AFP. A diplomatic source in Berlin said Foreign Minister Frank-Walter Steinmeier had convened a crisis meeting at his ministry.

"There was fighting outside and on the grounds of the consulate," a ministry spokesman said. "Afghan security forces and Resolute Support (NATO) forces from Camp Marmal (German base in Mazar-i-Sharif) are on the scene."

Afghan special forces cordoned off the consulate, previously well-known as Mazar Hotel. Helicopters were heard flying over the diplomatic mission early Friday as ambulances with wailing sirens rushed to the area, according to an AFP reporter near the scene.

At least two dead bodies and more than 100 wounded people -- including at least 10 children -- had so far been brought to two city hospitals, said local doctor Noor Mohammad Fayez. Some of the wounded are in a critical condition, he added.