Armed men killed at least 27 people and injured 29 others in the Afghan capital during a ceremony to commemorate a minority Shiite leader.
Several prominent political leaders escaped unscathed from Friday’s ceremony, including Abdullah Abdullah, the country’s chief executive and one of the main candidates in last year’s presidential election.
Afghan security forces were still trying to chase the gunmen out of a half-finished building, Interior Ministry spokesman Nasrat Rahimi said.
The Taliban denied any involvement in the attack. It came just days after the United States and the Taliban signed an ambitious peace agreement that paves the way for the withdrawal of American forces from Afghanistan.
The Islamic State group has attacked Afghan Shiites in the past and considers the religious minority to be heretical.
Any withdrawal of American troops would be linked in part to the Taliban’s promises to fight terrorism and IS.
On Friday, the ceremony took place in the predominantly Shia Dasht-e-Barchi region of the capital, Kabul.
The memorial marked 25 years since the death of Abdul Ali Mazari, the leader of the Hazaras minority in Afghanistan, who are mostly Shia Muslims.
He was killed in 1995 by the Taliban as they prepared to take control of Kabul, which had been destroyed by a brutal civil war between groups of mujahideen, including Mazari.