ISIS claimed responsibility for an explosion on Monday carried by a suicide bomber near a compound of Afghanistan's national intelligence agency in the capital, Kabul, the group said on its Amaq news agency. Following the attack, a gunbattle erupted between security forces and attackers.
A spokesperson for the interior ministry says that the bomber blew himself up near an office of the country's intelligence service, killing five people and wounding two.
The attack near Abdul Haq Square comes one week after gunmen stormed a military training centre in Kabul, an assault also claimed by ISIL.
Health Ministry spokesman Ismail Kawasi confirmed the death toll.
Islamic State militants have been active in Afghanistan since 2015 and have taken responsibility for a recent spate of violence. Three attackers were killed in that incident, and several security officers were injured.
In a surprise visit last week to Kabul and Masar-i-Sharif, German Foreign Minister Sigmar Gabriel vowed that the embassy, which previously had about 100 workers, would be up and running again soon.