As for motive—the Islamic State loathes Muslims it considers to have left the religion. Apostasy, or leaving Islam, is its favorite crime: The most horrific propaganda involves killing of those the Islamic State considers ex-Muslims, such as Mu’adh al-Kasasbeh (the Jordanian pilot it burned alive), or the thousand or so Shia it killed in a single go at Iraq’s Camp Speicher in June 2014. Suspected adulterers merely get their heads bashed in. When the group murders apostates, the videos linger sadistically on the victim as he dances in a lake of fire, or the blood pumps out of a wedge cut from his throat.

The mosque attacked today in Sinai is associated with Eid al-Jarir, a Sufi saint and founder of an eponymous mystical order. For the Islamic State, mysticism—the belief in a direct relationship to the divine—is heretical, and veneration of saints in any form elevates humans to a status that can claim a piece of the total and indivisible lordship of God himself. These are both killing offenses. About a year ago in Sinai, Islamic State fighters beheaded a hundred-year-old cleric, Suleiman Abu Haraz, for propagating these heresies. It’s not clear whether the attendees of Friday prayers at this mosque were mostly Sufis. But the Islamic State has killed for milder theological offenses than praying at a Sufi mosque. (Just three days ago, it killed about 50 people at a mosque in Nigeria, with similar justification.)