Mired in economic crisis and sidelined by former allies, the Palestinian Hamas movement has little to lose and much to gain in its latest conflict with Israel, analysts say.
The flare-up in violence has exacted a heavy human toll in Gaza, with more than 1,300 Israeli strikes having killed 166 people as the operation entered its sixth day yesterday.
Hamas has seen its leaders and military capabilities targeted, but analysts say it was in a position of such weakness before the war that it only stands to gain from this round of fighting.
Its one-time key ally Egypt has largely turned against the Islamist movement following the ouster of president Mohamed Morsi last year and a subsequent crackdown on his Muslim Brotherhood, which had backed Hamas.
Since then, ties between Hamas and the Cairo government, now headed by President Abdel Fattah al-Sisi, have deteriorated significantly.
Egypt has systematically destroyed the tunnels running between Gaza and the Sinai Peninsula, while keeping the official Rafah crossing mostly closed, contributing to a disastrous drop in Hamas's revenues from smuggling.
On the domestic front, Hamas -- which has governed Gaza for the past seven years -- recently signed a reconciliation deal with its Palestinian rivals in the West Bank.
The agreement effectively loosened Hamas's grip on power in Gaza, with the Islamist movement dissolving its government in favour of a consensus government of independents that is largely based in Ramallah.
Under such circumstances, the current conflict could be something of a boon for the group, said Akram Attallah, an independent analyst in Gaza.
"What Hamas wants from this war is to show it is still able to defend its people," he told AFP, saying the conflict could leave it "both more popular and better off financially".
The high-profile conflict could now see an influx of aid that would enable cash-strapped Hamas to once again return to its traditional role of provider for Gaza's 1.7 million residents.
And it could even offer an opportunity -- by means of a truce agreement -- for Hamas to secure an easing of Israel's eight-year blockade, which has contributed to the economic crisis.