Do not breathe easy yet. On Tuesday night, Hamas and other militant groups in the Gaza strip said they had accepted a ceasefire, after the worst outbreak of violence since the 2014 war. Israel said its actions would be determined by “steps on the ground”. If this does indeed ease the fighting, it will be more than welcome. But it will be at best a temporary balm. There have been warnings all year that another war – the fourth since Hamas took over in 2007 – could be on its way. The last one killed more than 2,250 Palestinians, more than half of them civilians, and more than 70 Israelis, including six civilians. The wholesale destruction in Gaza left 100,000 people homeless, worsening the already dire circumstances there.

Violence has flared since Palestinians began weekly protests along the border fence with Israel in March. Israel used live fire; 170 demonstrators died and thousands more were injured. There have been sporadic rocket attacks and airstrikes. But attempts to calm the situation – with Egypt acting as broker – appeared to be paying off in recent weeks, with the restoration of fuel shipments boosting the power supply, and the delivery of $15m (£11.5m) of Qatari aid allowing Hamas to issue back pay to public servants and police officers. Hamas officials attempted to curb the intensity of the protests.

Then came the Israeli raid on Sunday, which saw seven Hamas militants and an Israeli soldier killed in a firefight. The Israeli media reported that an intelligence-gathering mission went wrong. Even if Hamas accepted that account, it was never going to let the raid pass without retaliation. It has fired about 400 rockets and mortars from Gaza, while the Israeli military carried out more than 100 bombings, attacking targets including the Hamas television station as well as military positions.

Benjamin Netanyahu, the Israeli prime minister, warned on Sunday against an “unnecessary” war. Neither side believes that the other wants a new conflict. That in itself is a danger. As the International Crisis Group warned this summer, “each side also is under growing pressure to push the other to the brink”, and has an unrealistic assessment of the other’s minimum demands. When such potential for misjudgment is ladled on to the fundamental disagreements, the risks are real and immense.

Meanwhile, many in Israel will see the scale of Hamas attacks as evidence that a tougher stance is needed to deter it. They will be further alarmed that Hamas appears to have amassed a larger stockpile than previously thought and that it seems to be testing Israel’s “Iron Dome” defence system and adapting tactics accordingly.

Israeli hawks, so often successful in pushing Mr Netanyahu to the right, have been emboldened by Donald Trump. He has shown beyond doubt that he does not see the US’s role as arbitrator, but as champion of Israel. His choice of ambassador, Jason Greenblatt, the relocation of the embassy to Jerusalem, as well as the halting of all funding to the UN agency helping millions of Palestinian refugees and the withdrawal of funding to programmes in Gaza, have sent a clear message to the Israeli right, completed the emasculation of the Palestinian Authority and deepened the despair of Palestinians. No one – bar possibly Mr Greenblatt and Mr Trump’s son-in-law, Jared Kushner – can seriously imagine that the administration’s long-promised peace plan, said to be due for release soon, will really change the picture.

Last year, Israel’s government watchdog gave a damning verdict on the last Gaza conflict and Mr Netanyahu’s role. It found not only that the country had failed to prepare for Hamas tactics, but that it also did not consider diplomatic moves that could have de-escalated the conflict and had ignored the growing humanitarian crisis in Gaza. The risk of another war will remain as long as the desperation in Gaza does.