A suicide attacker on foot blew himself up near a compound belonging to the Afghan intelligence agency in Kabul on Monday, killing six civilians, officials said.
The attacker struck as workers arrived at their offices. The bombing took place a week after militants stormed a National Directorate of Security (NDS) training centre in the Afghan capital.
Interior ministry spokesman Najib Danish told AFP six civilians in a car were killed when the attacker detonated an explosive device.
"Six people were martyred and three others were wounded," Mr Danish said.
"They were hit when they were passing the area in their Toyota sedan vehicle. We still do not know the target of the attack but it happened on the main road."
The health ministry confirmed the death toll and put the number of wounded at one.
An AFP reporter at the site said the attack happened outside the main entrance to an NDS compound. Security forces swarmed the area, closing off the main road leading to the building.
Ambulances were seen leaving the scene, apparently taking casualties to hospitals in the city.
"Our initial information shows a blast took place near an intelligence headquarters in Shash Darak neighbourhood of Kabul," deputy interior ministry spokesman Nasrat Rahimi told AFP.
ISIL claimed responsibility for the attack in Kabul, which in recent months has become one of the deadliest places in the country for civilians.
Security there has been increased since May 31, when a massive truck bomb ripped through the diplomatic quarter, killing about 150 people and wounding around 400 others, mostly civilians.
Read more: At least 14 dead in suicide attack outside Kabul wedding hall
Last week's attack on the NDS was claimed by ISIL, which has expanded its presence in Afghanistan since it appeared in the region in 2015.
It has scaled up its attacks in Kabul, including those against the country's Shiite minority.
The resurgent Taliban and increasingly ISIL are both stepping up their assaults on security installations and mosques.
On Friday, a suicide bomber drove an explosives-laden Humvee into a police compound in the southern province of Kandahar, killing at least six officers and destroying a building.
The Taliban claimed responsibility for the pre-dawn ambush.
Casualties in the Afghan forces, beset by desertion and corruption, have soared to what a US watchdog has described as "shockingly high" levels since Nato forces officially ended their combat mission in 2014 and began a training and support role.
Morale has been further eroded by long-running fears that the militants have insider help — everything from infiltrators in the ranks to corrupt Afghan forces selling equipment to the Taliban.