By killing Hamas' senior military commander in Gaza, Ahmad al-Jabaari, Israel is taking a calculated risk. Mostly, Israel and Hamas have an uneasy understanding. Hamas doesn't shoot at Israel and it tries to prevent other militant groups in Gaza from shooting at Israel; Israel, in turn, refrains from any big military moves in Gaza.

Occasionally that understanding breaks down, and at the end of last week there were a couple of attacks on Israeli patrols around Gaza. Israel responded, which precipitated waves of rocket attacks from Gaza at southern Israeli towns.

What made these attacks different is that Hamas claimed responsibility for some of them. Israel has a pretty good understanding of who is launching what from Gaza. Occasionally it will avoid retaliation against Hamas if it feels that attacks were launched by one of the other militant groups in the territory, some of whom are more militant and more radical than Hamas. (Hamas also sometimes plays a double game here, using these small groups to launch attacks while maintaining plausible deniability.)

Israel absorbed these attacks for a few days, but the targeting of al-Jabaari, and the clear warning that it will launch a ground invasion of Gaza, signals to Hamas that Israel's patience has come to an end.

Israel is calculating that, notwithstanding Hamas' rhetorical allusions to Israeli actions having opened the 'gates of hell', Hamas does not want to risk a major military operation by Israel in Gaza. Whatever military victory it claimed the last time Israel sent troops into Gaza in 2008, the enormous damage done to Gaza's infrastructure and economy undermined Hamas' ability to govern Gaza and cost it political support (Gazans obviously blame Israel for this, but they also blame Hamas for its inability to improve their daily situation).

But Israel has made a risky calculation, for two reasons.

First, it is now at the mercy of events and mistakes. If a stray Israeli shell falls on a hospital or a kindergarten, Hamas may not be able to hold back even if it wants to. Hamas may also have trouble reining in other militant groups such as Palestinian Islamic Jihad, which is closely aligned with Iran (which has its own agenda here).

Second, the neighbourhood has changed and Israel can no longer be entirely sure of how the new neighbours will react. One obvious change is that Egypt now has a Muslim Brotherhood president, though it is actually more complicated than that. The Muslim Brotherhood is not interested in picking a fight with Israel at the moment. In fact, for reasons of self interest, they have done quite a bit behind the scenes to reassure Israel and the US about it commitment to the Egypt-Israel peace treaty.

The problem is that the new Egyptian regime's ability to resist being dragged into events in Gaza is weaker than that of its predecessor, not just because it is Islamist, but also because it is more populist. What is interesting about the recent escalation is that the attacks out of Gaza came at roughly the same time as the Egyptian military announced it was launching a new campaign to destroy the tunnels under the Gaza-Egyptian border in Sinai that are an economic but also military lifeline for the Palestinian territory.

Indeed, Hamas has become increasingly disappointed with the new Egyptian Government. Hamas had hoped that an Egypt led by a movement of which it is a branch would adopt a new approach, including by opening the border and by being less attuned to the security needs of Israel than was the Mubarak regime.

But the new Egyptian president has shown that he is no more willing to take greater responsibility for Gaza than was his predecessor. Unsurprisingly, the priority has been placed on the Muslim Brotherhood's interests: not just reassuring Israel and the US but also dealing with a serious security problem it has in North Sinai, which is in part fed by criminal and jihadist activity around the tunnels and the Gaza-Israel-Sinai border region.

The current escalation may well have been calculated (or is being exploited) by Hamas to force the new Egyptian Government into a more sympathetic position on Gaza. In this regard the missiles fired at Israel in recent days might really have been aimed at Egypt.

Photo, showing smoke rising after an Israel air strike in Gaza in December 2008, by Flickr user Amir Farshad Ebrahimi.