Interior Ministry spokesman Najib Danish told reporters that two Afghan employees of the Iraq Embassy died in the attack. Three police were injured, he said.
As the attack unfolded there were conflicting reports of casualties, with a witness saying he saw bodies of at least two policemen lying on the road outside the embassy soon after the attack began.
Also, IS said only two of its followers were involved in the attack, not four as Kabul officials said, adding to the conflicting reports.
Earlier Danish said only one policeman was wounded and that there were no fatalities among the security forces or civilians. Danish told The Associated Press over the phone that all the embassy staffers were safe but that the building had suffered extensive damage with windows broken and several rooms badly burned.
Also Read
Afghan President Ashraf Ghani condemned the attack and said it was the government's responsibility to provide protection to international missions.
In Baghdad, 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.
Earlier, Afghan officials who spoke on condition of anonymity as they were not authorized 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.
While the attack was still underway, the Islamic State affiliate in Afghanistan claimed responsibility in a statement carried by the IS-linked Aamaq news agency.
At least one eyewitness, a store owner who goes by the name of Hafizullah, many Afghans use only one name, said he saw the bodies of two policemen on the ground before armored personnel carriers and police arrived to cordon off the area.
More than an hour into the attack, witnesses reported hearing another powerful explosion and said they saw black smoke billowing skyward. It wasn't immediately clear what had caused the later explosion.
The Iraq Embassy is located in a part of the city known as Shahr-e-Now, which lies outside the so-called "green zone" where most foreign embassies and diplomatic missions are located and which is heavily fortified with a phalanx of guards and giant cement blast walls.
By comparison, the Iraqi Embassy is located on a small street in a neighborhood dominated by markets and businesses.
After Iraqi forces, backed by a US-led coalition, recaptured the city of Mosul from the Islamic State group earlier in July, the Iraq Embassy had called reporters to its offices in Kabul to express concerns that the local IS affiliate might stage large-scale attacks elsewhere to draw away attention from the militant group's losses in Iraq.
Disclaimer: No Business Standard Journalist was involved in creation of this content