At least 235 people have died in a militant attack on a Sufi mosque in Egypt’s restive Sinai peninsula in one of the worst terror incidents the country has seen in recent years.

Armed men detonated at least one suicide bomb and opened fire on people praying on Friday, survivors told state media.

It is not yet known who was behind the attack, but it comes after a spate of recent bombings targeting the police and army claimed by Isis-affiliated jihadis in the region.

Why is the Sinai so lawless?

Egypt’s Sinai peninsula, which borders Israel and the Gaza Strip, has long been a bastion for Islamic insurgents and Bedouin groups with grievances against the Cairo government.

It has been sidelined by the central government since Israel withdrew occupying troops in 1979 and militancy has often been stoked by Egypt’s brutal methods of dealing with dissidents.

Islamic extremism in particular has flourished in the region thanks to the chaos that has engulfed the country since the 2011 and 2013 revolutions.

As well as the Isis affiliate, at least four al Qaeda aligned groups are thought to be currently active there.

How long have Isis operated in Egypt?

Isis’ Sinai affiliate - known as the Sinai Province group - first emerged in 2011, and was previously known as Ansar Beit al-Maqdis.

It pledged allegiance to Isis after the declaration of their so-called caliphate across Syria and Iraq in 2014.

Since then it has claimed responsibility for dozens of attacks, including the 2015 bomb aboard a MetroJet flight which killed 224 people, many of them Russian tourists.

What are their aims in the Sinai peninsula?

The Sinai Group broadly speaking wants to create a breakaway state ruled by the same extremist version of Islam that Isis imposed on people under its control in its so-called caliphate.

While the majority of their operations primarily target the police, army and other security forces, the Isis affiliate has also carried out suicide bomb attacks and executions of Sufi Muslims, whose interpretation of Islam they consider heretical.

Jihadists have also targeted local tribes that work with the armed forces, branding them traitors.

Outside of the Sinai, Egypt’s 10 per cent Christian minority has been a frequent target for extremists, killing dozens of people in attacks on churches.

Government figures in Cairo have also been targeted.

Why are the Egyptian security forces struggling to contain them?

The military regime is unwieldy and political infighting is rife, leading to policy and operational delays and poor communications.

In addition, unlike in Syria and Iraq, Isis is not a landholding force in Egypt, and containing insurgency movements is more challenging.