The celebrations in Israel Tuesday morning over the Egyptian ceasefire initiative were premature. Contrary to the assessment of all manner of eminent Israeli notables, Hamas is not sufficiently weakened to accept an immediate ceasefire that meets none of its demands. Far from it. As Hamas made clear in the course of a rocket-filled Tuesday, it doesn’t give a damn about Egypt or Arab public opinion, and it is continuing on its own path, one of escalation.

You can say a lot to Hamas’s detriment in its handling of this conflict: It was wrong to enter this round of hostilities and it is acting hastily and even idiotically; it underestimated the resilience of the Israel home front and the capabilities of Iron Dome and of Israeli intelligence. But one thing must be acknowledged: It is determined and, to use IDF parlance, focused on seeing its mission through. It’s forces are still standing, and it is emphatically still standing by the demands it issued on the second day of this conflict, with no signs of flexibility. But that determination is likely to bring down disaster upon Gaza, and upon Hamas.

It faced a tough dilemma on Tuesday — a choice between accepting a proposal that did not meet its ceasefire demands but would ensure its survival, on the one hand, or rejecting the Egyptian offer and risking international and Arab isolation, a real threat to its future control of Gaza, and hundreds of deaths, on the other. As is so often the case, jihadism and “resistance” prevailed over governance and firm control. Or, as Hamas parliamentarian Mushir al-Masri put it, Hamas not only rejected the ceasefire, but made plain it was ready to fight to the last of its soldiers. Except perhaps that should be formulated a little differently: Hamas is ready to fight to the last drop of blood… of the residents of Gaza.

Hamas’s position makes sense, from its point of view. It wasn’t even told of the Egyptian terms before they were leaked to the Egyptian press. Cairo basically put a loaded pistol on the table and gave Hamas until 9 a.m. to make a decision. The clauses in the Egyptian offer ignored Hamas’s demands and largely replicated the understandings that ended 2012’s Operation Pillar of Defense.

In Israel, meantime, there was a failure to internalize the balance of power between Hamas Gaza and Hamas abroad, and between the military wing and the political hierarchy. Until late Tuesday morning, Israel’s thinking was that Hamas would find it hard to reject the Egyptian terms and that Hamas in Gaza wanted an end to hostilities more than Hamas abroad. Not the case.

The military wing had made clear even before dawn that it would not agree a ceasefire until its demands were met. And Israel evidently hadn’t realized that Hamas’s politicians are taking orders from the military wing these days, not the other way around. Fawzi Barhoum, a Hamas political spokesman, put it best in noting that there would be a truce only when the demands of the Izz ad-Din al-Qassam Brigades were met.

Al-Masri reiterated the military wing’s demands: 1. An end to the blockade of Gaza — a vague demand that may relate to land, sea and air, or only some of the above; 2. The reopening of the Rafah border crossing — a demand to Egypt, not Israel; 3. The release of dozens of its men who were freed in the 2011 Shalit exchange but rearrested in recent weeks as Israel sought the killers of its three teenagers in the West Bank.

That these demands relate to both Israel and Egypt underlines their complexity, and thus the sense that Hamas is still looking at many more days of conflict. It realizes that international opinion is against it, and that the world regards Hamas as having escalated the conflict, but believes that as reports of Gaza civilian casualties mount, world opinion will turn increasingly against Israel. It also believes that in a week or two, the Israeli public will start to become increasingly frustrated by the conflict, by the battering of the rockets, and differences of opinion in Israel will become bitter. And it calculates that if Israeli soldiers start dying, Israeli public pressure will demand an end to the conflict… on better terms for Hamas.

Not only are the sides far apart in terms of ceasefire clauses. Resolving the conflict is also complicated by the absence of a viable brokering mechanism between Israel and Hamas. Gaza’s rulers have made clear that Egyptian mediation is insufficient — put another way, it no longer regards Cairo as an honest broker. It recognizes that Cairo wants to see it weakened in the Arab world and in relation to Mahmoud Abbas’s Palestinian Authority. Finding a broker acceptable to both sides could well prove to be yet another highly complex challenge on the difficult route to end this conflict.