Four Afghans were killed and 119 people were injured late Thursday when a suicide bomber drove a lorry loaded with explosives into the German consulate in the northern Afghan city of Mazar-e Sharif, officials said.
A spokesman for the German Foreign Ministry said all its two dozen German staff were "safe and uninjured" after the bombing, adding that Afghan security forces and German special forces had "repulsed the heavily armed attackers."
Afghan officials said the suicide bomber had been the only attacker.
Taliban militants claimed responsibility, saying they had launched an attack on "invading infidels" in revenge for civilians killed in airstrikes on northern Kunduz.
More then 30 civilians were killed and 19 others injured in a series of airstrikes carried out in the city of Kunduz by US forces supporting Afghan troops in early November.
Munir Farhad, a spokesman for the governor of Balkh province, said Thursday's blast was so powerful that the windows in most buildings in the vicinity had shattered, which caused most of the injuries.
The German Foreign Ministry said the consul building had been "considerably damaged."
The lorry's load of explosives had been hidden under a heap of coal, according to Sayed Kamal Sadat, the provincial police chief.
Around 1,000 German soldiers are stationed at Camp Marmal, around 10 kilometers away from the consulate, and a rapid response team was sent immediately after the attack.
A small contingent of German troops has also been stationed in Kunduz since March to train and assist local soldiers, but the government in Berlin says the Bundeswehr was not involved in the November airstrikes.
    
                  
  