An Islamic State attack on the Iraqi embassy in Kabul has ended with a suicide bomber blowing himself up outside the gates and security forces killing three insurgents.
Monday's assault set off a four-hour gunfight that ended only after Afghan security forces had killed all the attackers.
There were conflicting reports of casualties as the attack unfolded, with a witness at the scene saying he saw bodies of at least two policemen lying on the road outside the embassy soon after the attack began.
IS said its fighters had killed seven guards but the militant group often exaggerates its claims on the number of casualties inflicted.
Interior Ministry spokesman Najib Danish said only one policeman was wounded and that there were no fatalities among the security forces or civilians.
Danish told The Associated Press that all the embassy staffers were safe but that the building had suffered extensive damage with windows broken and several rooms badly burned.
In Baghdad, the Foreign Ministry spokesman Ahmad Jamal condemned the assault as a "terrorist attack".
The attack began with a big explosion that rocked central Kabul shortly before noon, followed by gunfire that lasted for several hours, and two or three more subsequent large explosions.
Police quickly cordoned off the area, barring reporters from coming too close to the scene.
The Afghan Interior Ministry said a suicide bomber first started the attack, blowing himself up at the embassy gate, after which three attackers stormed inside.
Earlier, Afghan officials who spoke on condition of anonymity as they were not authorised to talk to the media, had said a car bomb started the assault. Later on, it became clear the suicide bomber was on foot and not driving a car.
The ministry statement said Afghan security forces quickly deployed to the scene, rescuing all the embassy diplomats and employees and taking them to safety.