GAZA CITY // No one doubted that Hamas would hit back when its military commander was blown up by an Israeli air strike.
The extent of the response, however, with rockets striking deeper into Israel than ever before, has surprised many.
Analysts say the Hamas retaliation may be explained in part by long-standing fissures within the Hamas leadership that have widened as a result of the Arab Spring. Squabbles within the movement, they say, have drowned out pragmatic voices.
Mahdi Abdul-Hadi, an analyst and founder of the Jerusalem-based Palestinian Academic Society for the Study of International Affairs, said internal rivalries have pressured the Hamas leadership to take a less-compromising stance during the flare-up with Israel.
Hamas officials in Gaza have tried to use the crisis to weaken the group's leadership abroad, he said. Conversely, foreign-based officials have reacted by heightening their own anti-Israel rhetoric.
That has pitted Khaled Meshaal, the Doha-based de facto leader of Hamas, against the group's Gaza-based prime minister, Ismail Haniyeh. The latter appears to be winning.
"The war in Gaza is showing that more legitimacy has shifted to Haniyeh, and he certainly hasn't missed that opportunity at all in showing his face, his speeches," said Mr Abdul-Hadi.
Mr Haniyeh delivered fiery speeches in Gaza in defiance of Israel while braving its air strikes. He also has not missed any photo opportunities. On Friday, he stood next to Egypt's prime minister, Hisham Qandil, during a visit to Gaza's Al Shifa Hospital. They were photographed together paying their respects to a Palestinian child killed by an Israeli attack.
Mr Meshaal, in contrast, who was in Sudan attending a conference of regional islamist figures, appeared far removed from the devastation.
The leader - considered a more pragmatic figure who has suggested recognising Israel - was left to deliver his rhetoric on Friday from a mosque in Khartoum, where he vowed revenge for a suspected Israeli attack on a weapons facility in the Sudanese capital last month.
"Hamas will take revenge for Sudan from Israel in retaliation for its aggression," he told worshippers.
The reactions represent a shift of power away from the outside leadership under Mr Meshaal that gained momentum when Hamas was forced last year to dismantle its headquarters in Damascus, Hussein Ibish, senior fellow at the Washington-DC-based American Task Force on Palestine, wrote in Foreign Policy, a US magazine, last week.
Hamas's leaders were under pressure to give a firm response to Ahmed Al Jabari's assassinationon on Wednesday, in part, to placate allied militant groups in Gaza that have been critical of an informal truce Hamas upheld with Israel in recent years.
Targeting Tel Aviv and Jerusalem went far beyond what was expected. Not only does it threaten to bring a devastating response from Israel, but it could strain Hamas's ties with its new allies in the Arab Spring countries of Egypt and Tunisia, where Islamist have risen to the key positions of power. It could also strain its relationship with Qatar, which last month reached out to Hamas with a visit to Gaza by the country's emir.
After the Arab Sping, Hamas parted ways with the Syria-Iran-Hizbollah axis and more firmly aligned itself with fellow Sunni-Arab governments, especially recently elected ones in Egypt and Tunisia that are led by fellow Muslim Brotherhood outfits.
"The attacks are part of the case for the transfer of paramount leadership away from the exiles and to the Hamas political and military leadership in Gaza, which portrays itself as doing the ruling and the fighting," Mr Ibish wrote.
Mark Heller, fellow at the Tel Aviv-based Institute for National Security Studies, said a widening of the conflict could force Egypt to choose between restraining Hamas or risk undermining its peace treaty with Israel. "I think Hamas is pushing the envelope as far as the Egyptian government is concerned," he said.
Nathan Thrall, the Jerusalem-based analyst for the International Crisis Group, described debate in Hamas over whether to continue fighting as partly based on desired concessions.
He said some want Egypt to open its sole border crossing Gaza to commercial trade in return for agreeing to a ceasefire. They also want Egypt to convince Israel to continue allowing goods into the enclave.
Others, however, want more concessions.
But the key question, Mr Thrall said, is "when will Hamas feel it has responded with sufficient strength for the assassination".
Without an Israeli concession, some doubt that it will.
"It seems in this case, Hamas will only de-escalate if Israel does so first, and I'm not sure that will happen," said Walid Al Mudallal, professor of political science at the Islamic University of Gaza.