The Afghan affiliate of ISIS on Saturday claimed responsibility for the suicide bombing at a Shiite mosque in the southern Afghan city of Kandahar that killed dozens and wounded dozens more.
The attack on Friday came about a week after another ISIS-claimed attack on Shiite worshippers at a mosque in the northern city of Kunduz that killed more than 60 people.
In a statement released on its Telegram channels, the extremist group said two ISIS Khorasan Province (ISIS-K) suicide bombers carried out separate attacks on different parts of the mosque in Kandahar, the spiritual heartland of the Taliban, while worshippers prayed inside.
Blast at Shiite mosque in Afghan city of Kandahar kills dozens
The group is a bitter rival of the Taliban, the hardline movement that seized power in August as the US and its allies withdrew from Afghanistan after two decades of conflict.
The UK-based conflict analysis company ExTrac said Friday's assault was the first by ISIS-K in Kandahar, and the fourth massacre since the Taliban took Kabul.
ExTrac researcher Abdul Sayed said the attack was "challenging the Taliban claims of holding control on the country".
If the Taliban can't protect Kandahar from an ISIS-K attack, how could it protect the rest of the country?" he asked.
In a video statement, Kandahar police chief Maulvi Mehmood said security for the mosque had been provided by guards from the Shiite community but that the Taliban would take charge of its protection from now on.
Hafiz Abdulhai Abbas, director of health for Kandahar, said 41 people had been killed and about 70 wounded, based on hospital figures.
Witnesses said they heard gunfire alongside the explosions, and a security guard assigned to protect the mosque said three of his comrades were shot as the bombers fought their way in.
"It was the Friday prayer time, and when we were preparing I heard shots. Two people had entered the mosque." Sayed Rohullah said.
"They had opened fire on the guards and in response the guards had also opened fire on them. One of them committed a suicide blast inside the mosque."
Other bombs were detonated in crowded areas outside the main building, he and other witnesses said.
"We are saddened to learn that an explosion took place in a mosque of the Shiite brotherhood in the first district of Kandahar city in which a number of our compatriots were martyred and wounded," Taliban Interior Ministry spokesman Qari Sayed Khosti said on Twitter.
US State Department spokesman Ned Price said Washington condemned the attack and repeated a call for the Taliban "to live up to the commitment it has made to counterterrorism, and specifically to taking on the shared threat we face from ISIS-K".
"We are determined to see to it that no group ... can ever again use Afghan soil as a launching pad for attacks on the United States or other countries," Mr Price said.
The UN mission in Afghanistan also condemned the "latest atrocity targeting a religious institution and worshippers".
"Those responsible need to be held to account," the UN Assistance Mission in Afghanistan said in a tweet.
The Taliban, who seized control of Afghanistan after overthrowing the US-backed government, have their own history of persecuting Shiites.
But the new Taliban-led administration has vowed to stabilise the country and promised after the Kunduz attack to protect the Shiite minority living under its rule.
Shiites are estimated to make up about 10 per cent of the Afghan population. Many are Hazara, an ethnic group that has been persecuted in Afghanistan for decades.
In October 2017, an ISIS suicide attacker struck a Shiite mosque in the west of Kabul, killing 56 people and wounding 55.