Both sides are claiming victory, Israel for wiping out 32 underground tunnels that Hamas intended for attacks on Israel, and Hamas for still being alive. In a mockery of its claim to have a political arm independent of its armed wing, political officials of Hamas were crowing about its determination to regroup and attack again.

The bottom line is that neither side has achieved its main goal of destroying the other. Israel is not going away. But neither are the Palestinians, and the extremists among them will always find a place and an audience if there is no hope and no responsible moderate leaders to point the way to a better future.

The Israeli-Palestinian conflict is no longer a narrowly defined problem that can be endured, contained or even managed. To an unusual degree, the Middle East is unsettled — from refugee flows, the spread of Sunni militants between Syria and Iraq, the Sunni-Shiite rivalry and even intra-Sunni divisions. Sunni forces in Iraq are attacking Kurdish and Christian populations. There is extremism and instability everywhere in the region.

That is why it is so important that indirect talks between Israelis and Palestinians in Cairo this week, mediated by Egypt, lay the ground for something bigger and more durable than one cease-fire. Certain conditions are clear. Rocket attacks into Israel by Hamas and other extremist groups must stop, along with other terrorist attacks. So does the smuggling of weapons into Gaza and the production of a new supply of rockets. There will need to be an international donors’ conference to rebuild Gaza, but with assurances that Hamas will not divert money for civilian projects into rockets and tunnels. Otherwise, there is little chance that Israel would end the blockade that has kept Gazans confined to the strip, and deprived them of imports, exports and jobs.

Hamas wants Israel to release prisoners. The Palestinian Authority, which recognizes Israel, wants a role in controlling the border crossings between Israel and Gaza. Prime Minister Benjamin Netanyahu of Israel, has signaled an eagerness to have the authority extend its reach to Gaza. But it cannot just be a policeman. If any agreements come out of Cairo, they must be designed to strengthen the authority and its president, Mahmoud Abbas, by managing whatever funds are donated to Gaza. It may be necessary to have Hamas in Cairo, but the group offers Palestinians nothing except nihilism and endless suffering.