Updated

Hamas has entered Egyptian-brokered talks with Israel on a new border regime for blockaded Gaza from a point of military weakness: it lost hundreds of fighters, two-thirds of its 10,000 rockets and all of its attack tunnels, worth $100 million, Israel says.

The Gaza war has boosted the Islamic militant group's popularity among Palestinians because it confronted Israel. But the mood can quickly turn if Hamas fails to deliver achievements for Gaza in the Cairo talks, most urgently the opening the territory's borders.

If the Cairo talks fail, Hamas will have only limited options, since resuming rocket fire would probably bring more ruination on an already-devastated territory. In the past month of Israel-Hamas fighting — the third major round of such hostilities in five years — nearly 1,900 Palestinians have been killed, more than 9,000 wounded and thousands of homes destroyed.

The massive destruction in Gaza City's neighborhood of Shijaiyah, close to the border with Israel, illustrated the extent of Hamas' military setbacks and the fickle public mood it faces.

Entire city blocks have been laid to waste in Shijaiyah in one of the fiercest battles of the war that pitted hundreds of Hamas gunmen against Israeli troops after the start of the Israeli ground operation July 17.

At least five of more than 30 cross-border military tunnels destroyed by Israel during the war had originated in Shijaiyah, and Hamas fought hard to protect the strategic assets, said Israeli military spokesman Lt. Col. Peter Lerner.

Shijaiyah resident Abdel Karim al-Ajla, 55, sat outside his destroyed two-story home with friends and relatives Wednesday, the second day of a temporary cease-fire that helped launch the indirect Israel-Hamas talks on Gaza's future.

"We paid a heavy price," said the English teacher. At the least, he said, "we hope now to open the borders."

However, Hamas can only meet such expectations by Gaza's people if it agrees to hand over some power to its long-time rival, Western-backed Palestinian President Mahmoud Abbas.

Hamas had seized Gaza from Abbas in 2007, prompting Israel and Egypt to impose tight border restrictions. In any new deal negotiated in Cairo, Israel and Egypt would only agree to open the borders if forces loyal to Abbas take up positions at the Gaza crossings.

For years, Hamas had managed to survive the closure with the help of smuggling tunnels under the Egypt-Gaza border. The tunnels were tolerated by Egypt as a way of easing the plight of Gazans without formally opening the frontier.

But with the ouster of a Hamas-friendly government in Cairo last year, Hamas' prospects worsened dramatically. The Egyptian military, considering Hamas a security threat, destroyed the tunnels and deprived Hamas of key revenues from tunnel taxation.

The ensuing financial crisis drove Hamas to a lopsided power-sharing agreement with Abbas in April. Abbas took charge of a unity government of technocrats in both the West Bank and Gaza. Hamas stayed in the background, but won one major concession: continued control over its security forces in Gaza.

In the Cairo talks, Hamas could only win a seat at the table by agreeing to join a Palestinian delegation led by an Abbas confidant, a reflection of Egypt's tough stance toward the group.

The delegation has so far presented joint demands — a lifting of the closure and an international pledging conference for Gaza reconstruction — but Egypt has made it clear it considers the Abbas camp to be the legitimate voice of the Palestinians.

Israel's top demand in the Cairo talks is that Hamas be disarmed or at least be prevented from re-arming.

Israel has said it is willing, in principle, to ease Gaza border restrictions — but only with safeguards that prevent weapons or goods with possible military uses, such as cement for building tunnels and bunkers, from reaching Hamas.

Hamas has said it will not surrender its weapons under any circumstances. It has signaled some flexibility in letting Abbas take a lead on Gaza reconstruction but has also said it wants to retain a say.

Palestinian pollster Khalil Shikaki said the Gaza war appears to have boosted Hamas' popularity, but that this might be short-lived if Hamas is seen as impeding reconstruction. If Abbas leads the process effectively, he will get a lot of credit, Shikaki said. "Obviously, if Abbas makes unreasonable demands, such as disarming Hamas, then the public will side with Hamas," he said.

Ahmed Yousef, a Gaza intellectual and former Hamas government official, said he believes the movement is eager to unload the burden of government after its financial difficulties of recent months. "I see Hamas going back to the street, working with people," he said, suggesting the group might run for parliament in the future, but not try to return to government.

"Hamas has restored its popularity and will build on that," he said.

Any attempt by Hamas to rebuild its military capacity is being disrupted by the Egyptian tunnel closures. In the past, the tunnels funneled not just consumer goods, but also weapons from Iran and Syria and raw materials for a local arms industry.

Lerner, the Israeli military spokesman, said the Hamas rocket arsenal, estimated at 10,000, has been reduced by two-thirds. Hamas fired more than 3,300 rockets at Israel since July 8 and another 3,000 rockets were destroyed on the ground in Gaza by Israeli strikes, along with more than 1,000 launchers, he said.

Israel has also destroyed 32 tunnels under the Gaza-Israel border intended for staging attacks. Of those, 14 had already reached Israel, he said. With each concrete-lined tunnel costing about $3 million to dig, Hamas lost a strategic investment of about $100 million, he said. The tunnels were on average 2.5 to 3 kilometers (1.5 to 1.8 miles) long and took two to three years to build.

Lerner said Hamas' ability to manufacture rockets locally has also been hurt, with airstrikes destroying 191 sites linked to manufacturing.

However, the military option remains open if Hamas feels cornered.

The spokesman of the Hamas military wing, who goes by the nom de guerre Abu Obeida, said Wednesday the group still has plenty of reserves. "What we have shown in the war (in terms of weapons) is very little, and we will have a lot in our inventory," he said in a text message in response to a question also sent by text.

___

Daraghmeh reported from Ramallah, West Bank. Associated Press writer Ibrahim Barzak in Gaza City contributed to this report.

___

Laub leads coverage of the Palestinian territories and has reported on the Israeli-Palestinian conflict since 1987. Daraghmeh, based in the West Bank, has covered Palestinian affairs since 1996.