TEL AVIV/GAZA Gaza's Hamas movement wanted a showdown with Israel because its leaders are high on something called the Arab Spring and competing to become martyrs to the Palestinian cause.
Or, from another perspective, cynical Israeli politicians think a Gaza offensive will be a walkover that will assure re-election in January and at the same time provide a death-blow to Palestinian statehood moves at the United Nations.
Those are two ends of a spectrum of theories among Israelis and Palestinians about what has propelled the two sides towards their second war in four years, escalating a low-level, slap-for-slap conflict to the brink of an Israeli invasion of Gaza.
Without going back 2,000 years to the origins of the dispute, the roots of the latest high-explosive crisis can be traced in a series of "red lines" that have been crossed.
Specifically: firing a Russian Kornet anti-tank missile on November 10 against Israeli soldiers; Israel's assassination of top Hamas commander Ahmed Al-Jaabari on November 14 after both sides appeared to have agreed to a tacit ceasefire deal, and then Hamas firing long-range rockets at Tel Aviv on November 15.
These were big steps that wrecked a fragile status quo.
RULES OF THE GAME
Israel withdrew from the Gaza Strip seven years ago and has regularly used its airpower to deter Hamas and other Islamist groups from firing their rockets into the Jewish state. The militants do not recognise Israel's right to exist.
In a bruising 2008-2009 three-week campaign, Israel first bombarded then briefly invaded Gaza, hoping to put a halt to the rockets for once and all. Operation Cast Lead left 1,400 Palestinians and 13 Israelis dead.
For a while, there was quiet, then the round of retaliations resumed. Missiles were fired, Israel struck back, sometimes targeting empty smuggling tunnels, sometimes targeting rocket crews. Palestinian civilians were also getting killed.
Both sides speak of "the rules of the game". And now both sides accuse the other of "stepping over the red line".
Palestinian analysts agree Hamas has the wind in its sails since the Arab Spring swept away pro-Western autocracies and replaced them with Islamists, especially in neighbouring Egypt where the ruling Muslim Brotherhood is their spiritual mentor.
"Of course, Hamas feels empowered by the change in the Arab countries around them and many believe Israel cannot isolate it any more," said a source close to Hamas who did not wish to be identified.
But while Hamas craves the legitimacy it needs to assume moral leadership of the Palestinian national movement from those it considers Western poodles chasing peace with Israel, it shares Gaza with armed salafist groups intent on violence.
"Hamas has been under continuous blackmail from other factions since it has been more interested in calm in order to preserve its authority in Gaza," Hani Habib, a political analyst in Gaza told Reuters.
CHANGING THE RULES
Trying to face both ways, Hamas abandoned efforts to stop these groups firing rockets at Israel and last month joined in, to show it was not getting soft in the chair of office.
In so doing, it tried to change "the rules of the game" but overplayed its hand, triggering a massive Israeli operation for which the military planning was sitting ready in a drawer. It came far faster and much heavier than Hamas expected.
"While they thought revolutions in Arab countries served their aims and would make them stronger, they were not looking for war with Israel, not now, despite the fact they have been preparing themselves for one since the 2009 round ended," said the source close to Hamas.
For Israel, a security situation that had been contained and politically tolerable -- zero or very infrequent rocket attacks on the south by groups other than Hamas -- tilted with Hamas' decision to start shooting again, and with new weapons.
Israel says the aim of Operation Pillar of Defence is not to re-occupy Gaza, or root out Islamists. It is to destroy long-range rockets such as the Fajr 5 from Iran that Hamas has acquired since 2009 and to disable Gaza's rocket capacity "for a very long time", said foreign ministry spokesman Yigal Palmor.
Could there be ancillary motives? Alastair Newton at Nomura Global Markets writes in a note to clients that "militants in Gaza have been building up stocks of missiles...and there does appear to have been an up-tick in missile attacks".
"However," he adds, "an Israeli general election is now just two months away ... Prime Minister Benjamin Netanyahu's Likud party has historically benefited from pre-election security concerns, which this latest conflict is likely to exacerbate."
Although a vast majority of Israelis supports the operation, a high body count could reduce popular backing.
Another vote is also looming -- one that the secular government of President Mahmoud Abbas in the West Bank wants to bring in the United Nations General Assembly by the end of November to give the Palestinians a diplomatic upgrade.
Israel says this drive for U.N. recognition of a state in the West Bank, Gaza Strip and East Jerusalem is "diplomatic terrorism". It has threatened to topple Abbas, who is regularly derided by Hamas for not supporting their armed resistance.
Abbas himself is convinced the Gaza campaign is designed to sink his initiative, but has vowed to plough on. "Everything that is happening is in order to block our endeavours to reach the United Nations," he said on Friday.
Israeli columnist Uri Dromi says Israel should remember that its Palestinian neighbours in the West Bank "are still committed to a two-state solution, namely, sharing the neighbourhood".
"If we lose them, then we are left with the others only."
WHY THE KORNET?
Hamas has courted Egyptian support assiduously since the election of Islamist President Mohamed Mursi in June. Mursi, however, has so far made clear that while denouncing Israeli "aggression" he will not go beyond diplomatic pressure.
The nuances of Gaza's militant politics are fine but provide some clues as to how the showdown has escalated.
"Hamas did not claim the Kornet hitting the (Israeli army) jeep. The Popular Resistance Committees (PRC) did," said the source close to Hamas. "It is true Hamas did not condemn it."
He did not deny that Hamas wanted to change the rules of the game whereby Israel decides when a round of violence will end.
"But assassinating Jaabari was like giving the go-ahead to all Hamas cells to use the equipment, weapons and training they had prepared for a possible war," he said.
Hamas official and columnist Mustafa Assawaf said Hamas was "not interested in silence forever, or a big escalation". A shaky new truce was in place thanks to Egyptian mediation, he noted, when Jaabari ventured out fatally onto Gaza's streets.
"Israel did not respect deals and understandings and after killing Jaabari tough reactions were inevitable even if it would lead to broader confrontation," he said.
Hamas used greater force to "establish a new formula that Israel is not the only party that owns power and that the resistance has its own tools that can be painful to Israel".
Assawaf rejected the suggestion that an internal leadership struggle within the movement motivated the rocket gamble.
"Hamas leaders are competing, but not for seats. They are competing for who dies as a martyr and gets into a coffin."
(Additional reporting by Noah Browning. Writing by Douglas Hamilton. Editing by Crispian Balmer and Jason Webb)
Our top photos from the past week.