Hamas leader Ismail Haniyeh with the emir of Qatar in Gaza, October 2012
The conflict between Hamas-controlled Gaza and Israel became inevitable after a series of decisions and actions made clear that the movement was not interested in defusing tensions and returning to the ceasefire that had shakily pertained since 2012.
These actions included the attempt to infiltrate a terrorist team into Zikim on July 8, the continued firing of rockets after the rejection of the Egyptian ceasefire proposal, the failure to respect the humanitarian cease-fire initiated by the UN and the attempted attack though a tunnel on July 14.
It is doubtful that Hamas planned the entire campaign from the start. The trigger to the crisis – the kidnap and murder of three Israeli teenagers, may well have been carried out by elements not taking orders from the movement's official leadership.
But as the momentum of events gathered pace, it is clear that Hamas at a certain point reached a decision to escalate, to initiate a head on collision with Israel.
What were the tactical and strategic considerations underlying this decision? Regarding immediate and tactical considerations – Hamas is not an isolated player. It is part of a Muslim Brotherhood regional alliance bankrolled by the Emirate of Qatar.
The last year has not been good for this alliance. In 2011-12, they were riding high. They had come to power in Egypt and in Tunisia and seemed fairly placed to triumph in Syria too. Hamas elected to back what looked like an emergent Muslim Brotherhood power bloc – and drew away from its alliance with Iran.
Not much is left of all that. Egypt and Tunisia are gone. In Syria, only the regime, Islamic State and the Kurds remain as serious players. The Muslim Brotherhood's moment in the sun was exceedingly brief.
This left their Palestinian iteration, Hamas, looking somewhat beached in 2014. The Iranian funding declined.
Egyptian President Abdel Fattah al-Sisi decimated the tunnel system through which the rulers of Gaza brought in goods and money. Fuel shortages and power outages became part of daily life. There was no money to pay state employees.
The Hamas decision to relaunch its military campaign, its refusal to accept Israel's offer of "calm for calm," and its rejection of an Egyptian cease-fire proposal that Israel accepted represent an attempt to bring about a "reset" in the position of Hamas and its backers in the region.
In precisely the same way that Iran created and developed Hezbollah in order to use the Israeli-Palestinian conflict as a generator of legitimacy among the Arabs for the Shia Persians, so Hamas and the Muslim Brotherhood want a bloody war in Gaza, so as to reinsert themselves into popular legitimacy, relevance and diplomatic influence in the Arab world.
Hamas, previously isolated and increasingly irrelevant, is starring in a drama of its own making. Its spokesmen are crying crocodile tears for the deaths of civilians that they knew were inevitable.
Hamas banners are being carried once more by baying crowds in European cities.
Qatar, meanwhile, the main bankroller of Hamas and the Muslim Brotherhood, is inserting itself back into regional diplomacy, following Hamas's flat rejection of Egyptian mediation.
UN Secretary-General Ban Ki-moon and PA Chairman Mahmoud Abbas were in Doha to hear Hamas's demands for a cease-fire. The emir of Qatar, Sheikh Hamad al-Thani is acting as the "channel of communication" for Hamas.
Yet for all this, the success has been only partial. The rival, anti-Muslim Brotherhood alliance of Sisi's Egypt and Saudi Arabia is operating in more or less direct opposition, seeking to prevent any tangible gains for Hamas from its campaign, and to force it back to acceptance of the status quo ante bellum.
Given the suffering of Gazans, any such acceptance would constitute a huge blow to Hamas. So Cairo is effectively allied with Israel and against Qatar/ Hamas/MB in this conflict. The obvious explanation for this is Cairo's ongoing war against the Egyptian Muslim Brotherhood.
The "Arab street" has failed to rally to the Qatar/Hamas banner. There are larger demonstrations in European cities for Hamas than in any Arab capital.
The Arab world is engulfed by issues of far greater historic magnitude than the question of Gaza. And in any case, from the regional perspective this conflict appears as an Israel vs Hamas war, not an all out clash between Israelis and Palestinians.
Regarding strategic considerations – Hamas remains committed to the muqawama ("resistance") doctrine, according to which it is engaged, together with other Islamist political-military organizations in a long war that will end in Israel's destruction.
According to this view, most famously articulated by Hassan Nasrallah, Hezbollah's general-secretary, Israel is physically and technologically strong, but suffers from a spiritual and ideological weakness.
This weakness is variously attributed either to the supposedly inherent cowardly and craven nature of Jews, or to the "artificiality" of the Jewish state and identity, or to a not quite logically tenable mixture of the two.
This weakness, the muqawama doctrine considers, can be brought out through a long war of attrition, in which the inability of the Jews to absorb casualties, and their gradual recognition of the impossibility of normal life in their state will result in its slow and steady erosion, and eventual demise.
From the point of view of this doctrine, the Hamas decision to escalate makes sense – even if to an outsider the idea of a tiny statelet willingly seeking conflict with a vastly more powerful neighbor seems counter-intuitive. The civilians whom Hamas leaders knew would die in any conceivable Israeli response were presumably factored in as collateral damage. From a certain point of view, they even represented an asset, since their example could be held out as proof of the supposedly greater willingness of the Arab/Muslim side for self-sacrifice, when compared with the Israeli/Jewish enemy.
So the war derives from the desire of Hamas, the Muslim Brotherhood and Qatar to return to relevance and centrality in the region, and from the persistent misreading of the nature of Israel and the true balance of forces between the Jewish state and its enemies, by the Islamist rulers of Gaza.
Jonathan Spyer is a senior research fellow at the Global Research in International Affairs (GLORIA) Center and a fellow at the Middle East Forum.