A suicide car bombing claimed by the Taliban has targeted Germany's consulate in Afghanistan, killing four people and wounding 128.
A five hour gun battle followed the bombing.
The Taliban claimed the attack saying it was retaliation for recent airstrikes in the northern city of Kunduz.
The blast destroyed the Mazar Hotel, where the consulate is based in the northern city of Mazar-i-Sharif, and surrounding buildings.
The car exploded at the entrance to the consulate, destroying the gate and wall at 11.10pm on Thursday night.
Dr Noor Mohammad Faiz of nearby Balkh hospital, where the bodies of the dead were taken, said many people were wounded in their homes as the intensity of the blast shattered windows nearby.
President Ashraf Ghani called the attack a "crime against humanity and all international laws".
Germany's foreign ministry said all consulate employees were safe and unhurt after the attack.
It said "heavily-armed assailants" were beaten back by consulate security staff, Afghan security forces and international troops based in Afghanistan as part of Nato's Resolute Support mission.
Germany has 983 soldiers stationed in Afghanistan, most of them in Balkh province, as part of the Nato mission. Mazar-i-Sharif is the provincial capital and one of the richest and most important cities in Afghanistan.