Ahmed Jabari almost definitely didn't see the airstrike coming.
On 14 November, the man in charge of Hamas's Qassam Brigades was driving through the streets of Gaza when the missile came. Although one of his henchmen described Jebari as a "martyr in waiting", he was no fool, nor was he known to take excessive risks. Rarely seen in public, Jabari had until recently presided over a period of relative calm in Gaza, perhaps even fooling himself that he had become indispensible to an Israeli leadership which fears chaos on its southern border even more than it fears Hamas.
In the end, it appears that someone on the ground in Gaza helped Israel get to Jabari. And that was only the start. Within an hour, further airstrikes had knocked out a large part of the long-range missile stocks with which Hamas have been threatening Tel Aviv. Israel had started its offensive with a pair of intelligence coups, and within an hour of the operation beginning Hamas had lost two if its most treasured assets - Jabari and its nascent missile deterrent. After days of further air strikes and Israeli troops massing on the border, Hamas was suing for a ceasefire in Cairo.
It wasn't only intelligence work that laid Hamas low. It was also overconfidence. Even as the group's former patron Bashar al-Assad's star has waned in Syria, the Arab Spring has increased the influence of Sunni Islamists throughout the Middle East. This has included where it matters most for Hamas, which is in Egypt.
It seems no coincidence that the uptick in violence that Hamas directed or allowed to be directed by more militant groups against Israel this year came in the aftermath of the Arab Spring. For a start, the chaos that prevailed on the Egyptian border with Gaza during the death throes of Hosni Mubarak's regime gave Hamas an opportunity to smuggle in supplies and weaponry. The new Egyptian government of Mohammed Morsi is more indulgent towards Hamas, as can be seen by the dispatch of the Egyptian foreign minister to Gaza after the Israeli operation began. Furthermore, the changing dynamics in the region seemed to give Israel less freedom for diplomatic manoeuvre.
With its fellow Islamists on the ascendant in Cairo and the world focused on Syria, Hamas appeared to believe it could return to its old tactic of subjecting Israel to a constant drip, drip of violence - this time under the cover of Egyptian support. This is where Jabari comes in. After maintaining relative quiet across Gaza and restraining factions such as Islamic Jihad in the aftermath of the Israeli onslaught of 2009, Jabari's forces reportedly unleashed or allowed to be unleashed some 700 missiles at Israel this year prior to their leader's death. They had then begun targeting Israeli military patrols on the border of Gaza with bombs and rockets, raising echoes of the operation which led to the kidnapping of Israeli soldier Gilad Shalit in 2006 - an operation that Jabari is believed to have masterminded.
Hamas appears to have miscalculated the extent to which Israel's freedom of manoeuvre has been affected by events in the region. Most critically, it seems to have miscalculated what it can expect from Egypt.
Trying to be supportive of Hamas while receiving billions in military aid from the US and hoping for billions more in economic aid is a tricky game indeed, but that is precisely what Morsi is attempting. Given the impact on the regional economy and the potential radicalising effect of Israeli-Palestinian violence on the Egyptian population, he needs another round of conflict in Gaza right now like he needs a hole in the head. Indeed, as the conflict broke out, an IMF team was in Cairo to negotiate a loan which Egypt desperately needs.
With Israel apparently still willing to act forcefully to establish its deterrent capability despite the turmoil in the Middle East and with the Muslim Brotherhood in Egypt having taken on governmental responsibility that makes it susceptible to US pressure, Hamas must be realising that the situation has not changed so much in its favour as it believed. The plaudits Mohammed Morsi is receiving from Hamas's enemies in the West must only drive the realisation home further.
That realisation came too late, if at all, to Ahmed Jabari. Denied vital Egyptian cover to protect its key assets from Israel, the next de facto ruler of Hamas in Gaza will have to choose an entirely new strategic direction, of which the first suicide bombing in Tel Aviv since 2006 may be a gruesome prologue. Increased conflict between Hamas and their ideological fellow-travellers in Cairo is inevitable as their goals diverge. But one thing the last week has proven is Hamas's ability to set the Middle East aflame - and with the potentially radicalising impact of the violence on the Egyptian population, that ought to worry Mohammed Morsi more than a little.