The Islamic State group on Saturday claimed responsibility for a suicide bomb attack on a Shiite mosque in the southern Afghan city of Kandahar that killed at least 41 people and injured scores more.
The Friday assault came just a week after another IS-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 jihadist group said two Islamic State-Khorasan (IS-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.
The group, a bitter rival of fellow Sunni Islamist movement the Taliban, which swept back to power in Afghanistan in August as the United States and its allies withdrew, regards Shiite Muslims as heretics.
UK-based conflict analysis firm ExTrac said Friday's assault was the first by IS-K in Kandahar, and the fourth mass casualty massacre since the Taliban took Kabul.
ExTrac researcher Abdul Sayed told AFP the attack was "challenging the Taliban claims of holding control on the country. If the Taliban can't protect Kandahar from an IS-K attack, how could it protect the rest of the country?"
Inside the mosque, after the blast, the walls were pockmarked with shrapnel and volunteers swept up debris in the ornately painted prayer hall. Rubble lay in an entrance corridor.
In the wake of the explosions, Kandahar police chief Maulvi Mehmood said "a brutal attack has been witnessed on a Shiite mosque as a result of which a huge number of our countrymen have lost their lives".
In a video statement, Mehmood said security for the mosque had been provided by guards from the Shiite community but that henceforth the Taliban would take charge of its protection.
Hafiz Abdulhai Abbas, director of health for Kandahar, told AFP 41 people had been killed about 70 wounded, according to hospital information.
At least 15 ambulances were seen rushing to and from the scene, as Taliban security cordoned off the area.
"We are overwhelmed," a doctor at the city's central Mirwais hospital told AFP.
"There are too many dead bodies and wounded people brought to our hospital. We are expecting more to come. We are in urgent need of blood. We have asked all the local media in Kandahar to ask people to come and donate blood."
Eyewitnesses spoke of gunfire alongside the explosions, and a security guard assigned to protect the mosque said three of his comrades had been shot as the bombers fought their way in.
Sayed Rohullah told AFP: "It was the Friday prayer time, and when we were preparing I heard shots. Two people had entered the mosque.
"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," tweeted Taliban interior ministry spokesman Qari Sayed Khosti.
The US State Department spokesman Ned Price said Washington condemned the attack and reiterated 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."
The UN mission in Afghanistan in a tweet also condemned the "latest atrocity targeting a religious institution and worshippers".
"Those responsible need to be held to account."
The Taliban, which seized control of Afghanistan after overthrowing the US-backed government, has its own history of persecuting Shiites.
But the new Taliban-led administration has vowed to stabilize the country, and in the wake of the Kunduz attack promised to protect the Shiite minority now living under its rule.
Shiites are estimated to make up roughly 10 percent of the Afghan population. Many of them are Hazara, an ethnic group that has been persecuted in Afghanistan for decades.
In October 2017, an IS suicide attacker struck a Shiite mosque in the west of Kabul, killing 56 people and wounding 55.