The Taliban says it carried out a suicide bomb attack on the German consulate in Afghanistan.
At least four civilians were killed and scores hurt when a car packed with explosives rammed into a wall surrounding the compound in the northern city of Mazar-i-Sharif.
Heavily armed attackers followed up the blast, battling with Afghan and German security forces late into the night.
The explosion is said to caused “massive damage”.
All Germans at the site were rescued unharmed.
A Taliban spokesman said the attack was in response to NATO air strikes against suspected militants last week in the city of Kunduz, in which dozens of Afghan civilians were killed.
The strikes were called in after US and local troops came under heavy fire during an operation in which two American service members also died.
The German foreign ministry has formed a crisis task force in response to the consulate attack.