Palestinians in Gaza should have been able to breathe a sigh of relief last week, as precarious ceasefire talks survived a two-day-long, heavy exchange of strikes that threatened to unleash yet another large-scale military assault by Israel.
Late on Tuesday, after the most intense bout of violence in four years, Israeli prime minister Benjamin Netanyahu and Hamas, the Islamic movement that rules Gaza, approved a long-term truce brokered by Egypt.
Both are keen to avoid triggering an explosion of popular anger in Gaza, the consequences of which would be difficult to predict or contain.
The tiny enclave is on life support, having endured three devastating and sustained attacks by Israel, as well as a suffocating blockade, over the past decade. Thousands of homes are in ruins, the water supply is nearly undrinkable, electricity is in short supply, and unemployment is sky-high.
But as is so often the case, the enclave’s immediate fate rests in the hands of Israeli politicians desperate to cast themselves as Israel’s warmonger-in-chief and thereby reap an electoral dividend.
Elections now loom large after Avigdor Lieberman, Israel's hawkish defence minister, resigned on Wednesday in the wake of the clashes. He accused Mr Netanyahu of "capitulating to terror" in agreeing to the ceasefire.
Mr Lieberman takes with him a handful of legislators, leaving the governing coalition with a razor-thin majority of one parliamentary seat. Rumours were rife over the weekend that another party, the nationalist Jewish Home, was on the brink of quitting the coalition.
In fact, Mr Netanyahu recklessly triggered these events. He had smoothed the path to a truce earlier this month by easing the blockade. Fuel had been allowed into the enclave, as had a controversial $15 million in cash from Qatar to cover salaries owed to Gaza's public-sector workers.
At this critical moment, Mr Netanyahu agreed to a covert incursion by the Israeli army, deep into Gaza. When the soldiers were exposed, the ensuing firefight left seven Palestinians and an Israeli commander dead.
The two sides then upped the stakes: Hamas launched hundreds of rockets into Israel, while the Israeli military bombarded the enclave. The air strikes killed more than a dozen Palestinians.
Mr Lieberman had reportedly expressed outrage over the transfer of Qatari money to Gaza, claiming it would be impossible to track how it was spent. The ceasefire proved the final straw.
Hamas leaders boasted that they had created a “political earthquake” with Mr Lieberman’s resignation. But the shockwaves may not be so easily confined to Israel.
Strangely, Mr Netanyahu now sounds like the most moderate voice in his cabinet. Fellow politicians are demanding Israel “restore its deterrence” – a euphemism for again laying waste to Gaza.
Naftali Bennett, the head of the settler Jewish Home party, denounced the ceasefire as “unacceptable” and demanded the vacant defence post.
There was flak, too, from Israel’s so-called left. The opposition Labour party leader Avi Gabbay called Mr Netanyahu “weak”, while former prime minister Ehud Barak said he had “surrendered to Hamas under fire”.
Similar sentiments are shared by the public. Polls indicate 74 per cent of Israelis favour a tougher approach.
Sderot, close to Gaza and targeted by rockets, erupted into angry protests. Placards bearing the slogan “Bibi Go Home” – using Mr Netanyahu’s nickname – were evident for the first time in his party’s heartland.
With this kind of goading, an election in the offing, and corruption indictments hanging over his head, Mr Netanyahu may find it difficult to resist raising the temperature in Gaza once again.
But he also has strong incentives to calm things down and shore up Hamas’s rule.
The suggestion by some commentators that Mr Netanyahu has turned a new leaf as a “man of peace” could not be more misguided. What distinguishes Mr Netanyahu from his cabinet is not his moderation, but that he has a cooler head than his far-right rivals.
He believes there are better ways than lashing out to achieve his core political aim: the undermining of the Palestinian national project. This was what he meant on Wednesday when he attacked critics for missing “the overall picture of Israel’s security”.
On a practical level, Mr Netanyahu has listened to his generals, who warn that, if Israel provokes war with Hamas, it may find itself ill-equipped to cope with the fallout on two other fronts, in Lebanon and Syria.
But Mr Netanyahu has still deeper concerns. As veteran Israeli military analyst Ben Caspit observed: “The only thing more dangerous to Netanyahu than getting tangled up in war is getting tangled up in peace.”
The Israeli army has responded to months of largely non-violent mass protests at Gaza’s perimeter fence by killing more than 170 Palestinian demonstrators and maiming thousands more.
The protests could turn into an uprising. Palestinians storming the fence that imprisons them is an eventuality the Israeli army is entirely unprepared for. Its only response would be to slaughter Palestinians en masse, or reoccupy Gaza directly.
Mr Netanyahu would rather bolster Hamas, so it can keep a lid on the protests than face an international backlash and demands that he negotiate with the Palestinians.
Further, a ceasefire that keeps Hamas in power in Gaza also ensures that Mahmoud Abbas and his Palestinian Authority, based in the West Bank, can be kept out.
That was in part why Mr Netanyahu, against his normal instincts, allowed the transfer of the Qatari money, which had been opposed by the Palestinian Authority. It is not just a fillip for Hamas, it is a slap in the face to Mr Abbas.
A disunited Palestine, divided territorially and ideologically, is in no position to exert pressure on Mr Netanyahu – either through Europe or the United Nations – to begin peace talks or concede Palestinian statehood.
That is all the more pressing, given that the White House insists that President Trump’s long-delayed peace plan will be unveiled within the next two months.
Leaks suggest that the US may propose a separate “entity” in Gaza under Egyptian supervision and financed by Qatar. The ceasefire should be seen as a first step towards creating a pseudo-Palestinian state in Gaza along these lines.
Palestinians there are now caught between a rock and a hard place. Between vengeful hotheads such as Mr Lieberman, who want more carnage in Gaza, and Mr Netanyahu, who prefers to keep the Palestinians quiet and largely forgotten in their tiny prison.
Jonathan Cook is a freelance journalist in Nazareth