KABUL, Afghanistan — Suicide attackers stormed a crowded mosque in Kabul during Friday Prayer, officials said, killing at least 20 people and wounding dozens of others in the latest in a series of deadly attacks against Shiites in Afghanistan.

The Islamic State, which previously claimed deadly assaults against Shiite targets in the country, said its militants were behind the attack, according to the group’s Amaq news agency.

Worshipers who had jumped out of windows and fled barefoot from the siege described scenes of panic and bloodshed after gunmen entered the compound in a residential area in the north of the city. The men stormed in after an explosion, believed to have been caused by grenades thrown at security guards at the entrance.