At the time of writing, a destabilizing conflagration in the Gaza Strip appears to have been narrowly diverted. Unless Israel is readying a surprise attack (as it has done in the past), Hamas is set to accept Jerusalem’s offer to cease rocket fire within 48 hours. As P.M. Netanyahu stated yesterday in an all-too-familiar fashion: “Calm will be met with calm, fire will be met with fire.”

The scales have tipped dramatically in Hamas’s favor this week, and there may be very little that its rivals in Israel or the Palestinian Authority can do about it. Just four days ago, international sympathy for Israel was at its highest level in years after the bodies of three kidnapped teens were uncovered in a Hebron-area field. These gruesome murders, likely carried out by a rogue Hamas cell, drew fierce condemnation from nearly every western leader. In the media, the human aspect of an Israeli society struggling to survive in a tough neighborhood has never received so much attention.

Had it not been for an equally-gruesome (yet unsolved) murder of a Jerusalem-area Palestinian boy hours after the three Israeli teens were buried, Israel would have been free to respond to Hamas in a time, place, and manner of its choosing. At the time, the majority of the Israeli cabinet was against launching a broad operation in Hamas-controlled Gaza. Instead, they were keen on settling for a campaign to clean up Hamas’s remaining infrastructure in the West Bank, and then sitting back and watching as the Palestinian unity agreement disintegrated over Fatah’s continued cooperation with Israel. The night after the bodies of the three teens were recovered witnessed a notable reduction in rocket fire, in line with statements of a fearful Hamas leadership claiming that they did not seek an escalation.

Hamas has since become emboldened, exploiting the outrage over the Jerusalem murder to present itself as the only entity sticking up for the Palestinians against the occupation, while a suddenly-silent Fatah reels from criticism from its internationally-lauded security cooperation with Israel. Rocket fire has increased to levels not seen since Operation Pillar of Defense in 2012, albeit to limited ranges as to not hand international legitimacy back over to Israel.  With East Jerusalem, the West Bank, and parts of Israel’s Arab sector on the cusp of a third intifada, Israel’s room to maneuver against Hamas is shrinking rapidly.

At this critical juncture, there are now two scenarios which could play out, each arguably in Hamas’s favor.

Ceasefire in Gaza goes into effect

If the said Egyptian-mediated ceasefire goes into effect, the political benefits for Hamas will be numerous. The group will be able to claim that its threats held back an Israeli operation in Gaza, while maintaining its street credibility amongst an increasingly angry West Bank population, particularly among the youth. Israel, meanwhile, would be left to its own devices to calm the situation in the West Bank. The IDF would be unable to touch the Hamas leadership in Gaza, which is sure to continue efforts to foment unrest in the West Bank and drive a wedge into cooperation between the President Abbas’s security forces and Israel.

Meanwhile, Hamas will have had succeeded in easing its crippling isolation in the Arab World by forcing Egypt back to the negotiating table for the first time in nearly a year. As part of Egypt’s crackdown on the Muslim Brotherhood, it severed all relations with Hamas, while cutting off its economic lifeline by closing the Rafah border crossing and demolishing the tunnels below it. As part of this ceasefire, it is reasonable to assume that Hamas was able to reclaim its status in Cairo as the sole negotiating partner in Gaza, which enables it to secure other concessions, including an easing of restrictions at the Rafah crossing.

Ceasefire in Gaza fails to materialize

If the speculated ceasefire either fails to materialize or collapses shortly after (and there are plenty of reasons why it will), Israel will be faced with the choice of continuing with its measured nightly responses or launching an operation on the scale of Operation Pillar of Defense or bigger. Jerusalem knows full well that popular discontent will rise rapidly if residents in the south are forced to spend their summer in bomb shelters, making a major operation to reset Israel’s deterrence inevitable as long as rocket fire persists.  A major operation in Gaza will further enflame the West Bank and areas in northern Israel, making it even more difficult for President Abbas to justify cooperation with Israel domestically. Even though Hamas will suffer major losses, it will still able to boost its military image by launching what will likely be an even greater number of rockets at into central Israeli cities, than in previous rounds. The “surprises” threatened by Hamas on July 3 may also include incursions into southern Israeli communities through tunnels, also scoring the group even more street credibility.

Israel’s dilemma

The IDF’s top brass and numerous other security officials have warned about a major operation in Gaza given the tension in East Jerusalem and the West Bank, but current regional realities add further consequences to attacking Gaza. Despite the danger faced by residents in the south, P.M. Netanyahu and the IDF view Gaza as a nuisance, detracting from efforts to quell larger regional threats, particularly Iran’s nuclear program. To make matters worse, the leaderships of Egypt and Jordan, whose cooperation with Israel is at a high-point, would be faced with fierce domestic criticism which could lead to a strain in relations at the worst possible time, given shared security threats posed by jihadists in the region.

But while Hamas may gain from the current instability in the short-term, it still faces existential political threats which are unlikely to be solved through violence. The group’s real beef with Fatah lies in the latter’s refusal to pay salaries to 40,000 Hamas government employees in Gaza, along with numerous other accusations of violations of the reconciliation agreement. Hamas’ only real option is to keep using violence in both Gaza and the West Bank as leverage against President Abbas,  Israel, and Egypt to deter them from further marginalizing the Islamist group through military or political means.