Egypt branch of ISIS suspected of mosque massacre
The Islamic State group's Egypt branch is the main suspect in Friday's massacre at a mosque in the Sinai Peninsula, the latest attack in a long-running jihadist insurgency.
It has yet to claim responsibility for the operation, which killed more than 300 people including children. Here are some facts about the group.
Jihadists had operated in Sinai for years, but infrequent attacks turned into a fully fledged insurgency after the military, prompted by mass protests against Islamist president Mohamed Morsi, ousted him in 2013.
The main jihadist group operating at the time was called Ansar Beit al-Maqdis, and its propoganda reflected loyalty to Al-Qaeda.
Following Al-Qaeda's split in Syria, ISIS declared a caliphate there and Iraq in 2014, and Ansar Beit al-Maqdis pledged allegiance to the new "caliph". There are no reliable figures on how many fighters have joined it.
The military says it has killed hundreds of the jihadists, believed to be led by Bedouin militants from tribes in the sparsely populated peninsula.
War of attrition
Unlike in Syria and Iraq, ISIS has been unable to seize and hold urban centres in Sinai.
One July 2015 attempt to seize the town of Sheikh Zuweid ended with the jihadists' withdrawal after the military unleashed F-16 jets against them. But the group has kept up a steady war of attrition involving roadside bombings, sniper fire and checkpoint attacks.
Its fighters are believed to hide in the mountainous desert in mid-Sinai and have some freedom of movement between army checkpoints and away from major thoroughfares.
In occasional propoganda releases, the jihadists can be seen setting up their own checkpoints to confiscate cigarettes and other items they deem un-Islamic.
They also have deadly underground cells that carry out assassinations and bombings in the North Sinai capital of El-Arish and on the mainland, including southern Egypt.
Officials said the jihadists have been well-armed with anti-tank missiles, machineguns and explosives smuggled from chaotic Libya and elsewhere.
But the scale of Friday's attack on a Muslim house of worship shocked even ISIS supporters who argued on social media that the jihadists could not have carried it out.
The state prosecution quoted witnesses as saying the attackers - between 25 and 30 militants wearing camouflage - had flown ISIS' dreaded black banner.
Shadowy leadership, foreign fighters
Details about the group's leadership are scarce, and security services avoid disclosing them except in statements announcing their deaths. Both the leadership and the lower ranks are believed to be dominated by Bedouins and mainland Egyptians.
The group and affiliated jihadists have identified several Palestinians from the neighbouring Gaza Strip killed fighting in their ranks. After an attack on a monastery in south Sinai, police also released an image of a slain attacker who wore a vest identifying him or the vest's original owner as Moroccan.
In 2016, the military said it had killed the group's overall commander in Sinai, Abu Duaa al-Ansari, in air strikes.
He is believed to have been Mohamed Freij, the brother of deceased Ansar Beit al-Maqdis founder Tawfiq Freij.
ISIS later confirmed his death and said it had replaced him with another commander, Abu Hajar al-Hashemi, of whom little is known.
A captured jihadist told interrogators that the identity of the group's top leader in Sinai was not known, and that he passed on instructions through a subordinate.
Under the top commander, responsibilities are divided among militants who command sections on "security", "military affairs", bomb-making and media.