A suicide bomber blew himself up outside the Iraqi embassy in Kabul Monday and militants breached the compound, Afghan officials said, in a complex hours-long attack claimed by the Islamic State group.
All the attackers had been killed and the compound secured roughly four hours after the assault began, Afghanistan's interior ministry said, adding that all embassy staff were safe and only one policeman wounded "slightly".
There were conflicting reports about how the attack unfolded. The interior ministry said at least four militants had attacked the embassy, beginning with a suicide bomber who detonated his vest at the compound entrance.
"The quick-response police forces arrived in time and evacuated the Iraqi diplomats to safe place. No embassy staff have been harmed, only one policeman was wounded slightly," a ministry statement said.
An Afghan security official at the site of the attack and a number of witnesses however suggested the attackers were dropped by a car nearby, who then stormed the Iraqi embassy building with hails of bullets, before penetrating and detonating themselves inside.
Black smoke billowed into the air above the neighbourhood in northwestern Kabul as the sound of gunfire, blasts and ambulance sirens could be heard. Panicked residents, including women and children, could be seen fleeing the area.
The Iraqi foreign ministry in Baghdad said the charge d'affairs was among those evacuated and that it was monitoring the situation with Afghan authorities, without giving further details.
The Afghanistan affiliate of the Islamic State group claimed responsiblity for the attack, according to a statement by its propaganda agency Amaq. It said two of its members attacked the embassy killing at least 27 guards and other embassy staff.
The militant group is known to often exaggerate its claims on the number of causalities inflicted.
The Iraqi embassy is located in northwestern Kabul, in a neighbourhood that is home to several hotels and banks as well as large supermarkets and several police compounds.
"I heard a big blast followed by several explosions and small gunfire," said Ahmad Ali, a nearby shopkeeper.
"People were worried and closed their shops to run for safety. The roads are still blocked by security forces."
The attack is the latest to rock Kabul, which is regularly devastated by bomb blasts and militant assaults, often killing many civilians.
The resurgent Taliban claim many of the attacks as they step up their bid to drive out foreign forces with a series of assaults across the country.
But the Islamic State group, recently ousted from the Iraqi city of Mosul, have been expanding their footprint in eastern Afghanistan and have claimed responsibility for several devastating attacks in Kabul.
- 'We will hunt them down' -
First emerging in 2015, the group's local affiliate Islamic State Khorasan Province (IS-K), overran large parts of eastern Nangarhar and Kunar provinces, near the Pakistan border, where they engaged in a turf war with the Taliban.
US forces in Afghanistan have repeatedly targeted the group, killing its head Abu Sayed and several senior advisers in a July 11 strike in Kunar, the Pentagon has said.
The decision to deploy the so-called Mother Of All Bombs (MOAB) also targeted IS hideouts in Nangarhar, according to the Afghan defence ministry, though fighting in the area has continued.
Pentagon officials say the group now numbers fewer than 1,000 in Afghanistan.
"We will be relentless in our campaign against ISIS-K. There are no safe havens in Afghanistan," said General John Nicholson, commander of US forces in Afghanistan, in a statement Sunday confirming some of the deaths in the July 11 strike.
The group is believed to be on the back foot in the Middle East, where analysts have said it has lost more than 60 percent of its territory and 80 percent of its revenue, three years after declaring its self-styled "caliphate" across swathes of Iraq and Syria.
But analysts said Monday's attack in Kabul would be seen as a warning to Baghdad after it pushed IS out of Mosul.
"(IS) wants to send a message to many states, not just to Iraq, to prove that it is present everywhere ... particularly after the victories of the Iraqi security forces in Mosul," said Issam al-Fili,a professor of Political Sciences at the Al-Mustansiriya University in Baghdad.
"Attacking embassies is part of the strategy of this kind of group, because embassies represent a strong symbol for the affected states," he said, adding that the attack would not have come as a "surprise" to Baghdad.