A suicide bomber has detonated his explosives close to a procession commemorating the death of a former anti-Soviet and anti-Taliban commander, killing at least seven people, officials said.
The attacker targeted a convoy marking the 17th anniversary of Ahmed Shah Massoud's death in the centre of the Afghan capital Kabul on Sunday, according to police spokesman Hashmat Stanikzai.
At least 24 were wounded in the explosion, the interior ministry said in a statement.
All the casualties were civilians.
Islamic State of Iraq and the Levant (ISIL) has claimed the attack.
The force of the blast shattered windows and shook nearby buildings.
Among the dead was the driver of a car taking part in the commemorations. He veered off the road and into the front of a shop when the blast happened, witnesses told AFP news agency.
Two of his passengers were wounded, they said.
The blast came hours after another suspected suicide bomber was shot by police in Kabul before he could detonate his device.
Police said he was planning to detonate explosives near supporters of Massoud, dubbed the Lion of Panjshir, a Tajik fighter who led resistance to the Soviet occupation in the 1980s and to the 1996-2001 Taliban government.
The commemorations for Massoud involved dozens of cars and pickups carrying men armed with heavy weapons.
At least 13 people were wounded by falling bullets and taken to hospital, health ministry spokesman Waheed Majroh told journalists.
Police arrested 110 people and seized 20 cars and 10 weapons, the interior ministry said, as part of a crackdown on the violent commemorations.
Massoud was killed two days before the 9/11 attacks in New York and Washington, DC, that precipitated the US-led invasion of Afghanistan in 2001.
The attacks on Sunday follow a spate of deadly attacks in the city, including a double bombing at a wrestling club on Wednesday that killed at least 26 people, including two journalists, and wounded 91 people.