Afghan officials say a suicide bomber has detonated his explosives inside a Shi’ite mosque in Kabul, killing at least 30 people. The extremist group Islamic State claimed responsiblity for the attack.

Fraydon Obaidi, chief of Kabul police’s Criminal Investigation Department, said 35 other people were wounded in the November 21 attack.

The United Nations described the attack as "an atrocity" and said at least 32 worshipers were killed and more than 50 wounded. The victims include many children.

The bomber targeted the Baqir ul-Olum mosque in the western part of the city as worshippers gathered there for Shi'ite religious rituals marking the end of a 40-day mourning period for the anniversary of the death of Imam Hussein, the Prophet Muhammad's grandson.

“A martyrdom attack by an Islamic State fighter targets a Shi’ite [shrine] in the city of Kabul," the group's Aamaq Agency said in a newsflash.

The Taliban denied they had any role in the attack, which President Ashraf Ghani described as "barbaric."

"Terrorists cannot achieve their masters' goals by spreading fear," he said in a statement.

Afghanistan should not fall victim to "enemy plots that divide us by titles," said Chief Executive Abdullah Abdullah, who called the bombing "an act against Islam and humanity."

It was the third major attack on minority Shi'a in the Afghan capital since July, when an attack also claimed by the Islamic State militant group killed 80 people at a Shi'ite demonstration in Kabul.

On October 11, at least 18 people were killed in a gun attack on worshippers at a shrine in Kabul. They were observing Ashura, one of the holiest occasions in the Shi'ite calendar and the annual remembrance of the seventh-century death of Iman Hussein.

Shi'a make up about 15 percent of Afghanistan's population. But sectarian rivalry between the minority Shi'a and majority Sunni has been relatively rare during decades of war in Afghanistan.

In recent years, civilians have been the major victims of escalating violence in Afghanistan. A UN report in July said 1,601 civilians had been killed in the first half of this year.