The Islamic State group claimed a suicide attack that killed six people in Kabul on Monday and wounded 20 others, its propaganda agency Amaq said.
“A suicide attacker wearing an explosives belt hits a gathering of Shiites near the presidential palace... in Kabul,” Amaq said.
Afghan interior ministry spokesman Najib Danish said at least six people were killed in the blast, which struck in front of a high school in the downtown area of the Afghan capital, near the presidential palace.
Initial reports indicated most of the victims were members of the security forces, but Danish said civilians, including several women, had borne the brunt of the carnage.
The attack hit close to where scores of Afghans had been protesting Taliban attacks on the minority Hazara ethnic group, most of whom belong to the Shia branch of Islam.
“The suicide attacker on foot wanted to target protesters, but he was stopped at a security checkpoint some 200 metres (660 feet) from the site,” interior ministry deputy spokesman Nasrat Rahimi said.
IS has claimed most suicide attacks in Kabul in recent months.
On October 31, an IS suicide bomber targeting a bus carrying employees of Afghanistan's biggest prison — also in Kabul — killed at least seven people. That attack came days after a suicide bomber blew himself up near the entrance of Afghanistan's Independent Election Commission in the capital, killing at least one person.
A police officer at the scene said he saw 10 to 15 casualties on the ground, as well as body parts. The centre of Kabul was blanketed with heavier-than-usual security for the protest, which began on Sunday night and continued into Monday.
Demonstrators, including university students, had taken to the streets to demand the deployment of military reinforcements to two Hazara-dominated districts in the southeastern province of Ghazni which have been attacked by the Taliban.
In other violence, a Taliban attack on Khak Safid district in the western province of Farah overnight killed up to 40 local police and civilians, provincial council member Dadullah Qaneh told AFP.
“They set the houses of local police members on fire, killed women and children and local police,” Qaneh said. Provincial police spokesman Mohibullah Mohib confirmed the attack, but had no information on the number of casualties.
The Kabul explosion came as Afghan security forces step up ground and air offensives in Jaghori and Malistan districts, where Hazara pro-government fighters and Afghan troops are battling the militants.
Fighting in the area has been ongoing since Wednesday, fanning fears that the violence could be rooted in ethnic or sectarian differences. Most Hazaras belong to the Shia branch of Islam.
“We have no news from our people living there,” Asif Ashna, one of the protesters, said in a Facebook live broadcast.
“If the government's duty is to protect the lives of the people then why have they not taken any measures in the past week?” Protester Ishaq Anis told AFP that security forces should be permanently based in Jaghori and Malistan to prevent “further attacks against Hazara people”.
Hazaras have long criticised the government for failing to protect them from attacks by the Taliban and the militant Islamic State (IS) group, some even suggesting the blundering was deliberate. The escalation in violence comes as US envoy Zalmay Khalilzad returned to the region as part of efforts to convince the Taliban to end the 17-year war.
Khalilzad met with President Ashraf Ghani on Saturday. The former US ambassador to Kabul will also visit Pakistan, the United Arab Emirates and Qatar, where the Taliban has a political office. A Taliban delegation met with Khalilzad in Doha in October to discuss ending the Afghan conflict.