A suicide bomber has killed at least 27 people at a Shia Muslim mosque in the Afghan capital Kabul, police say.
At least 35 more people were wounded in the blast at the Baqir ul Olum mosque in the west of the city. The attack came as worshippers gathered for a religious ceremony.
It is not yet clear who was behind the blast but Afghanistan's Shia have faced a series of sectarian attacks in recent months claimed by the Islamic State (IS) Sunni Muslim militant group.
Monday's bombing took place during a service to commemorate the death of Imam Hussein, the Prophet Muhammad's grandson and Shia martyr.
Officials said the attacker was on foot and blew himself up among crowds inside the building. Eyewitnesses said the service was almost over when the bomb was detonated.
"I was inside the mosque and the Mullah was reading the prayer," Ewaz Ali, 50, who suffered minor injuries, told the Associated Press news agency. "Suddenly a huge explosion happened, then everywhere was dark."
Another worshipper, Nadir Ali, told AFP news agency the blast had created a cloud of dust: "When the dust settled down, I saw the mosque was full of flesh and blood. I was injured in my waist and had to crawl out of the mosque."
Local reports suggested children were among the dead.
There has not been a proper census for more than 40 years, but it is estimated that around 20% of the Afghan population are Shia Muslims - the rest are Sunni. Most Shia Muslims come from the Tajik and Hazara ethnic minorities.
They have been spared levels of sectarian violence seen in Pakistan and Iraq, but they have been targeted at least three times in recent months:
- In a gun attack on a shrine in Kabul in October in which at least 14 people died
- In an explosion at a mosque in October in the northern province of Balkh in which at least 14 people died
- In a suicide bomb attack on a Shia protest march in July, which left 80 dead
All three attacks were claimed by IS. Taliban militants were quick to distance themselves from Monday's attack.
"We condemn this blast," Taliban spokesman Zabihullah Mujahid told the BBC. "This act cannot be our work and has nothing to do with us."
President Ashraf Ghani called the attack an attempt "to sow seeds of discord".
Afghan government Chief Executive Abdullah Abdullah urged the country not to fall victim to "enemy plots that divide us by titles".
"This attack targeted innocent civilians - including children - in a holy place," he said via Twitter. "It is a war crime and an act against Islam & humanity."