GAZA CITY, Gaza Strip – Hamas has emerged from battle with the triumphal sense of a hard-won game change: By stopping its offensive when it did, Israel’s hard-line government seems to have grudgingly accepted that the Islamic militant group cannot soon be dislodged from power in Gaza.

Hamas dared rocket the Tel Aviv and Jerusalem areas, then stared down threats of a ground invasion to wipe out the group — emerging with its rule intact, world figures rushing to the region to put out the fire and key Muslim countries openly on its side. In the rush of diplomacy, Hamas also succeeded in overshadowing its main Western-backed Palestinian rival.

Still unclear is whether the Egyptian-brokered truce can deliver the promised end to Gaza’s stifling blockade.

On Thursday, the first full day of calm after eight days of fighting, the contrast in mood couldn’t be sharper.

Gazans celebrated the cease-fire with fireworks, Hamas militants flaunted their weapons and a Hamas political leader, Khalil al-Haya, taunted Israel, saying “you can’t invade us.”

Israel’s mood was subdued. Unlike in previous military campaigns against Hamas, Israel had set the bar low from the start, saying it only wanted to end to Gaza rocket fire, not topple the Islamists in charge of the Palestinian territory since they seized it from their rival Palestinian President Mahmoud Abbas in 2007.

The offensive had started seemingly unexpectedly, with the assassination of the Hamas military chief with a missile strike on his moving car on Nov. 14.

Over eight days, Israel’s military struck some 1,500 Hamas-linked targets in Gaza and amassed troops on the border, while Israel’s leaders threatened a bruising Gaza invasion, just like the one Israel staged four years earlier.

But Israel did not send in troops, even after Hamas barraged the Jewish state with hundreds of rockets, including several falling close to Tel Aviv and Jerusalem — something many had believed would surely trigger an invasion.

Israeli Defense Minister Ehud Barak said he was not willing to embark on a military adventure and risk antagonizing the international community.

“Hamas won’t be toppled unless Israel retakes Gaza, but I’m not sure that would be wise,” Barak acknowledged on Israel Army Radio.

Prime Minister Benjamin Netanyahu said Israel could always reconsider if Hamas breaks the cease-fire, but that seemed unlikely considering warnings from the U.S. and the West of the high cost of sending ground troops.

Hamas leaders bragged that their improved arsenal, including longer-range rockets and anti-tank missiles smuggled from Iran via tunnels under the Gaza-Egypt border, helped deter Israel’s military. But a bigger factor may have been the change of leadership in Egypt.

Four years ago, Egypt was ruled by pro-Western Hosni Mubarak. This time around, Hamas had an effective ally in Mubarak’s successor, Mohammed Morsi, like the Gaza Islamists a member of the region-wide Muslim Brotherhood. Morsi emerged as an effective mediator, since he already had the trust of Hamas and Israel did not want to risk hurting its ties with the Arab world’s most populous nation.

The apparent formula on the table is that Hamas halts weapons smuggling into Gaza in exchange for an easing of the Gaza border restrictions imposed by Israel and Mubarak after the Hamas takeover of Gaza more than five years ago. Morsi has eased restrictions on the main Egyptian crossing but not completely thrown it open as Hamas would like.

Hamas demands complete freedom of movement in and out of Gaza, while balking at the idea of demilitarizing the territory. However, an Israeli security official, speaking on condition of anonymity, said Israel would link the two.

Israel’s military has presented possible plans for easing restrictions to Israel’s political leaders, the official said.

This includes allowing building materials for reconstruction into Gaza for the first time since 2007 and permitting trade between Gaza and the West Bank, the two territories that Palestinians hope will one day make up the bulk of their state. Eventually, Gaza-West Bank travel could also be considered, he said.

Such border changes, if approved by Israel’s political leadership, could help reboot Gaza’s battered economy, shore up Hamas’ popularity and extend the Islamists’ rule. In exchange, Hamas would have to stop arming itself and essentially give up what is now a pillar of its power.

Hamas’ main gains have been in the political arena. Foreign ministers from the region rushed to Gaza over the past week to show support for Hamas, while the U.S. and Israel grudgingly acknowledged Hamas’ central role by conducting indirect talks.

Hamas also managed to show up Abbas, its main Western-backed political rival who — rendered largely irrelevant — watched events unfold from the sidelines.

Netanyahu’s willingness to negotiate a truce deal with Hamas, while refusing to engage Abbas on the same terms as previous Israeli prime ministers, reinforced many Palestinians’ belief that Israel only responds to force. If Hamas extracts border concessions from Israel, this would further discredit Abbas, the most prominent Palestinian proponent of non-violence and of negotiating the terms of a Palestinian state alongside Israel.

With Hamas doing the fighting and the negotiating, Abbas and prospects for a two-state solution to the Mideast conflict “are on the losing end,” said the International Crisis Group think tank.

The Israeli offensive, added Washington-based analyst Jonathan Alterman, may have “provoked one of the more profound shifts in Palestinian politics.”