Sinai attacks: Dark omen for Egypt?
For the past three years, Egypt's Sinai peninsula has been growing increasingly lawless and violent - preceding the toppling of President Mohammed Morsi and last week's massacre of his supporters.
Although Sinai had always been somewhat unstable, Egypt's 2011 revolution saw the withdrawal of security forces from the peninsula and the release of former militants from prisons.
Weapons flowed across Sinai's desert from Sudan and Libya into the Hamas-run Gaza.
Traditionally independent Bedouin groups flouted the writ of the government, often facilitating smuggling networks. Emboldened militants, including growing numbers of foreigners as well as local tribesmen, conducted a steady stream of abductions of tourists and attacks on soldiers and policemen.
Toward the end of 2011 some of these militants even sought to establish an al-Qaeda branch in Sinai, Ansar al-Jihad. Yet militancy in Sinai remains dominated by a jumble of more parochial groups with looser ties to al-Qaeda.
There was no respite during Mr Morsi's short-lived Islamist administration, during which one of the deadliest incidents occurred - the killing of 16 Egyptian soldiers in Sinai near the Israeli border in August 2012.
The attack was conducted by one such local group - Ansar Jerusalem. On that occasion, the Muslim Brotherhood itself called on the government to "confront this serious challenge to the Egyptian sovereignty" and "protect Sinai from all armed groups".
Mr Morsi responded with a crackdown. This included - to Israel's approval - the demolition of tunnels between Sinai and Gaza.Heavy-handed tactics
Despite these efforts Mr Morsi was accused by the army of being too lenient, after he released Islamists from prison and vetoed military operations in Sinai.
There was outrage when he appointed a member of Gamaa Islamiya, a former militant group that conducted attacks on tourists, as governor of the tourism-dominated city of Luxor.
These factors were later cited as reasons for Mr Morsi's removal, although the balance of evidence suggests that he dealt with Sinai much as his predecessors had done.
On the face of it, then, Monday's ambush of 24 Egyptian policemen is in keeping with these trends.
But violence in Sinai has intensified since the toppling of Mr Morsi, suggesting that events in Egypt's core are closely linked to those in its periphery.
Why should this be so?
Egypt's political crisis began with the army pitted against the Brotherhood. Some other Islamists, including more extreme Salafists, even backed the coup at first. The Brotherhood was isolated.
But the army's heavy-handed tactics and the government's apparent desire to eradicate the Brotherhood are causing the crisis to fuse with the distinct and broader jihadist violence, giving added impetus to militants.
The battle against the Brotherhood is increasingly interpreted as a battle against all Islamist currents rather than just one political party.
The Muslim Brotherhood themselves are careful to endorse only peaceful resistance, despite the violent reaction of their supporters across the country.
But their public narrative - that "the struggle to overthrow this illegitimate regime is an obligation" - chimes with the jihadists' historic opposition to a military that they have fought for decades and whose return to power they fear.Regional repercussions
Events in Sinai also underscore that the Egyptian crisis is a regional one.
Militants in Sinai can threaten Israeli cities with long-range rockets. Only two weeks ago what appears to have been an Israeli drone strike - conducted with Egypt's permission - killed four people there.
Egypt's military has also sought and received Israeli permission - required under the terms of its 1979 peace treaty - to move two extra battalions into Sinai as part of a large-scale military operation against militants, another factor contributing to the heightened violence.
This is why Israeli officials have lobbied for the US to resist calls to suspend its substantial aid package to the Egyptian army.
American officials are also worried that the generals might respond to an aid cut-off by suspending security co-operation or even allowing conditions in Sinai to worsen. That, in turn, might inflame Gaza and jeopardise the peace talks between Israelis and Palestinians, recently resumed after considerable American diplomatic effort.
Instability in Sinai has also resulted in repeated attacks on gas pipelines to Jordan, putting pressure on the fragile economy of a key American ally.
Sinai may be a dark omen of things to come in Egypt.
If the government acts on its threat to ban the Brotherhood, then the group's more radical and violent Islamist counterparts, including those in Sinai, will have a surfeit of recruits.
State repression of the Muslim Brotherhood in the 1950 and 1960s drove it underground and was instrumental in shaping the ideology of the modern, international jihad. The present leader of al-Qaeda, Ayman al-Zawahiri, was a young member of the Brotherhood who moved from Islamism to jihad in that period.
Today, that process would have the added advantages of social media, weak states like Libya on Egypt's border, and the context of flourishing al-Qaeda affiliates in places like Yemen and Syria.
The army's eliminationist rhetoric and brutal violence, as well as Brotherhood supporters' own violence against security forces and minorities, could lead to a repeat of that radicalisation.
If the two sides cannot find a compromise then more of Egypt will begin to resemble Sinai, and the ripples will be felt far beyond Egypt's borders.