Thursday evening's blast targeted police as they clashed with angry protesters following a raid on shopkeepers accused of illegally peddling drugs and alcohol.
"At this time a suicide bomber detonated himself among the crowd, killing and injuring dozens," Kabul police spokesperson Abdul Basir Mujahid said.
All of the dead were police. Among the 18 wounded were 16 officers and two civilians, deputy interior ministry spokesperson Nasrat Rahimi told reporters.
"The bomber came from among the protesters and targeted our police forces," Rahimi said, adding the attacker was wearing civilian clothes.
The blast stripped bark from trees and shattered windows of nearby apartments, underscoring the devastating force of a single suicide bomber. A reporter several kilometres from the scene heard the explosion.
The IS group has gained ground in Afghanistan since it first appeared in the region in 2015 and has scaled up its attacks in Kabul, including on security installations and the country's Shia minority.
Two children among six killed in Attock hospital cylinder blast
Thursday's assault was the first major attack carried out by IS militants in Kabul this year, but follows a series of deadly ambushes in the capital in recent weeks.
In December alone IS claimed three attacks that killed dozens of civilians. The deadliest of those happened a week ago when a suicide bomber blew himself up inside a Shia cultural centre in Kabul, killing 41 people and wounding more than 80 others.
Security in Kabul has been tightened since May 31 when a massive truck bomb ripped through the diplomatic quarter, killing some 150 people and wounding around 400 others -- mostly civilians. No group has yet claimed that attack.
But experts say IS operates several cells in the city, enabling the group to plan and carry out attacks under the noses of Afghan security and intelligence agencies.
On Wednesday, Afghanistan's spy agency announced it had busted a 13-member IS cell in Kabul that had been hatching "a series of big terrorist attacks" in the city.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ