A car bombing targeted the Iraqi Embassy in central Kabul today, followed by gunfire, Afghan police officials said.
There were no immediate reports of casualties.
The attack was still under way as witnesses reported hearing gunshots and several subsequent explosions in the area of the embassy. Details were sketchy as police cordoned off the area of the firefight.
Two police officials told the Associated Press that the car bomb exploded outside the embassy, followed by an attempt by gunmen to enter the building, which is located in the centre of the Afghan capital.
Interior Minister spokesman Najib Danish told the AP that the Iraqi diplomats were safe and had been rescued. He said it is believed three gunmen were involved in the attack.
A police officer in the area, who identified himself only as Abdullah, said the gunfire was initially intense but was now sporadic. The area was surrounded by armoured vehicles and a large contingent of police and Afghan soldiers.
More than an hour later, witnesses reported hearing another powerful explosion and saw black smoke billowing skyward. The cause of that blast was not immediately clear.
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 armoured personnel carriers and officers arrived to cordon off the area.
"The explosion was so strong. I was so afraid," said Maryam, a woman crying near the site of the attack. She said she works at the nearby office of Afghanistan's national airline Ariana.
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 in a small street in a neighbourhood dominated by markets and businesses.
No-one immediately claimed responsibility for the attack, though both the Taliban and an affiliate of the so-called 'Islamic State' have previously carried out such attacks in Kabul.
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.