What kind of relations do the jihadists of northern Sinai and Gaza have with Islamic State, and with Hamas? Egyptian President Abdel Fattah al-Sisi declared a three-month national emergency this week, following the killing of over 31 Egyptian soldiers in a suicide car bombing carried out by jihadists in northern Sinai.No organization has issued an authoritative claim of responsibility for the bombing, but it comes amid a state of open insurgency in northern Sinai, as Egyptian security forces battle a number of jihadist organizations. Most prominent among these groups are Ansar Bayt al-Maqdis and Majlis Shura al-Mujahideen; the attack on the Sinai military base came a few days after an Egyptian court sentenced seven members of Ansar Beit al-Maqdis to death for carrying out previous attacks on the army.In subsequent days, Egyptian officials pointed an accusing finger at the Hamas rulers of Gaza, asserting there is “no doubt that elements belonging to Palestinian factions were directly involved in the attack.” Cairo is now set to build a new barrier separating the Strip from northern Sinai.In a number of Arabic media outlets, unnamed Egyptian government sources openly accused Hamas members of aiding the assault, assisting with planning, funding and weapons supply.Are the Egyptian claims credible? Are there links between Hamas or smaller jihadist movements in the Gaza Strip and the insurgents in northern Sinai? And no less importantly, is the armed campaign in northern Sinai linked to Islamic State? First, it is important to understand that jihadist activity in northern Sinai is not a new development. Long before the military coup of July 3, 2013, and indeed before the downfall of president Hosni Mubarak in February 2011, this area had become a lawless zone in which jihadists and Beduin smugglers of people and goods carried out their activities.Ansar Bayt al-Maqdis emerged from this already existing jihadist milieu in the period following Mubarak’s ouster.At this time, Egyptian security measures in the area sharply declined.Ansar Bayt al-Maqdis has not confined its activities to the Sinai area; rather, it has directly engaged in attacks on Israeli targets. Recently, the group beheaded four Sinai locals who it accused of being “spies for the Mossad,” also carrying out two rocket attacks on Eilat this past January.The claim of links between Hamas and Ansar Bayt al-Maqdis has been raised in the past. In September, Egyptian security forces claimed to have found uniforms and weaponry identifiable as belonging to Hamas’s Izzadin Kassam brigades.It is worth remembering that the current Egyptian government has, since its inception, sought to link salafi jihadist terrorism with the Muslim Brotherhood in Egypt, as part of its strategy of marginalizing and criminalizing the Brotherhood.The current statements seeking to link Hamas directly to Ansar Bayt al-Maqdis may form part of this larger strategy.For its part, Hamas indignantly denies any link to this week’s bombing.But what can be said with greater confidence is there is, without doubt, a burgeoning and violent salafi jihadist subculture which encompasses northern Sinai and southern Gaza – with various organizations possessing members and infrastructure on both sides of the border.Ansar Bayt al-Maqdis itself and Majlis Shura al-Mujahideen both have members in Sinai and Gaza. Working tunnels smuggling goods and weapons exist between Gaza and northern Sinai, despite Egyptian attempts to destroy them.It is also a fact that Hamas is aware of these tunnels and makes no attempt to act against them, benefiting economically from their presence.From this standpoint, Hamas authorities in Gaza are guilty by omission of failing to act against the infrastructure supplying and supporting salafi guerrillas in northern Sinai, whether or not the less verifiable claims of direct Hamas links with them have a basis.Given this reality, it is also not hard to understand the Egyptian determination to build an effective physical barrier between the Strip and Egyptian territory.What of the issue of support for Islamic State? Should these jihadist groups be seen as a southern manifestation of the Sunni jihadist wave now sweeping across Iraq, Syria and increasingly, Lebanon? From an ideological point of view, certainly yes.From an organizational point of view, the situation is more complex.According to Aymenn Jawad al-Tamimi, an expert on jihadist groups currently based at the Interdisciplinary Center Herzliya and the Middle East Forum, neither Ansar Bayt al-Maqdis nor Majlis Shura al-Mujahideen have formally pledged their allegiance to the caliphate established by Islamic State in parts of Iraq and Syria.Nevertheless, Tamimi confirmed, both organizations have expressed “support” for Islamic State and its objectives, while not subordinating themselves to it through a pledge of allegiance.Ansar Bayt al-Maqdis is known to maintain contacts with Islamic State, which has advised it on the mechanics of carrying out operations. Islamic State, meanwhile, has publicly declared its support for the jihadists in northern Sinai, without singling out any specific group for public support.Tamimi further notes the existence of two smaller and more obscure groups in Gaza with more direct links to Islamic State.These are Jamaat Ansar al-Dawla al-Islamiya fi Bayt al-Maqdis (The Group of Helpers/ Supporters of the Islamic State in Bayt al-Maqdis), which carries out propaganda activities from Gaza and helps funnel volunteers to Syria and Iraq, and the Sheikh Abu al-Nur al-Maqdisi Battalion, a Gazan contingent fighting with Islamic State in these countries.So, a number of conclusions can be drawn: Firstly, Hamas, in its tolerance of and engagement with smuggling tunnels between Gaza and Sinai, at least indirectly permits the jihadists networks operating these tunnels to wage their insurgency against Egypt – even if the claims of a direct Hamas link to violent activities in Sinai have not yet been conclusively proven.Secondly, the most important organizations engaged in this insurgency support Islamic State, and are supported by them, though the former have not yet pledged allegiance and become directly subordinate to the latter.Islamic State is not yet in northern Sinai, but its close allies are. Their activities are tolerated by the Hamas rulers of the Gaza Strip – as long as they are directed outward, against Egypt and Israel.