A suicide bomber slipped into a crowded Shiite mosque in Kabul on Monday and blew himself up during a prayer ceremony, killing at least 30 people and wounding scores in the latest attack claimed by the Islamic State on Afghanistan’s Shiite minority.

The Amaq news agency, which is affiliated with the Islamic State, carried a statement saying that a member of the militant group had carried out the blast, according to the SITE Intelligence Group, which monitors online messages from extremist factions.

The midday attack occurred in the Baqir-ul Ulum mosque and cultural center in a Shiite district in western Kabul during a ceremony marking the end of the traditional 40-day mourning period since Ashura, one of the holiest days in the Shiite calendar. An attack on another Kabul mosque during Ashura killed 17 people.

Several hours after Monday’s blast, volunteers were sweeping glass from shattered windows and rolling up bloodstained carpets in the main worship hall.

“I heard a huge noise and the room filled with smoke. When it cleared, I saw bodies everywhere,” said Hussein Ali Nazari, 37, one of the volunteers.

An injured Afghan man lies on a stretcher outside the Estiqlal Hospital. (Wakil Kohsar/AFP/Getty Images)

Huge chunks from the badly damaged stone pillars lining the large prayer room littered the floor. Near the ceiling, a sign in Arabic said, “A mosque is only for spiritual pursuits.”

Nazari said several hundred men and boys had been praying in the main hall at noon when the bomber struck among them. Women and girls had been gathered on an upstairs balcony. He said survivors used scarves and shawls to carry the dead and wounded outside until ambulances arrived.

[A humanitarian crisis looms in Afghanistan as the number of displaced climbs]

The Ministry of Public Health reported late Monday that at least 30 people were killed, including children, and about 80 injured. Earlier in the day, Faridoon Obaidi, head of Kabul’s criminal investigations department, said 27 people were killed and 35 wounded.

Officials from the United Nations’ mission in Afghanistan condemned the attack as an “atrocity,” noting that the bomber had targeted civilians at a special ceremony that had drawn a “particularly large congregation.” In a statement, U.N. official Pernille Kardel expressed “revulsion at this latest effort by extremists to stoke sectarian violence in Afghanistan.”

The U.S. Embassy and the U.S. military assistance mission also issued statements condemning the attack.

The blue-domed mosque and cultural center is in the heart of Kabul’s Shiite and ethnic Hazara enclave, a bustling but poor area lined with used-clothing and vegetable stalls, as well as bicycle-repair and carpentry shops.

A suicide bomber killed more than 30 people and wounded dozens more at a Shiite mosque in the Afghan capital on Monday. A survivor of the blast recounts the moment the attack happened. (Reuters)

The bombing was the third deadly attack in five months on the Shiite and Hazara community. All the attacks have been claimed by a local affiliate of the Islamic State, which views Shiites as heretics.

During Ashura ceremonies on Oct. 11 — commemorating the 7th-century death of Imam Hussein, a grandson of the prophet Muhammad — gunmen attacked a Shiite shrine in Kabul and left 17 dead. On July 23, a peaceful protest by young Hazara activists in the capital was bombed, killing 80 people.

The attacks appeared intended to stoke sectarian tensions in a country where the majority Sunnis and the minority Shiites, who make up about 15 percent of the population, have historically had amicable relations.

That tolerance has been tested as Sunni Taliban insurgents have continued their assault on the state and as Hazara rights groups have become more vocal. The provocative injection of the Islamic State, a rival of the Taliban, has generated both fear and defiance among local Shiites.

Several people visiting the mosque on Monday afternoon noted that Sunnis had been among the worshipers at the prayer service. They said their community was determined not to let outside forces sow divisions.

“The people who did this want to create fear among Shiites and divide us from Sunnis, but we know they are the enemies of all Islam and all Afghans,” said Ali Hadi Laghwani, a worshiper and member of the Hazara high council.

Schemm reported from Addis Ababa, Ethi­o­pia.

Read more:

Islamic State claims role in deadly Shiite shrine attack in Kabul

Latest Afghan attack raises questions on security

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news