*
On 12 June, ten days after the new government was formed, an unexpected event radically changed Hamas's fortunes. Three Israeli students at yeshivas in the West Bank were kidnapped and murdered. When their bodies were found, a group of Israeli Jews abducted a 16-year-old Palestinian outside his East Jerusalem home, doused him in petrol, and burned him alive. Protests erupted among Palestinians in Jerusalem, the Negev and Galilee, while the West Bank remained relatively quiet. Israel blamed Hamas for the murders of the yeshiva students, though several Israeli security officials have said they believe that the perpetrators didn't act on orders from above. In its search for the suspected murderers, Israel carried out its largest West Bank campaign against Hamas since the Second Intifada, closing its offices and arresting hundreds of members at all levels. Hamas denied responsibility for the abductions and said Israel's accusations were a pretext to launch a new offensive against it. Among those arrested were more than fifty of the 1027 security prisoners released in 2011 by Israel in exchange for the Hamas-held Israeli soldier, Gilad Shalit. Hamas saw the arrests as another violation of the Shalit agreement, which had named conditions under which the released prisoners could be re-arrested and contained unfulfilled commitments by Israel to improve conditions and visitation rights for other Palestinian prisoners. The Palestinian leadership in Ramallah worked closely with Israel to catch the militants, and had rarely been so discredited among its constituents, many of whom believe abducting Israelis has proved the only effective means of gaining the release of prisoners widely regarded as national heroes. In several West Bank cities, residents protested against the PA's security co-operation with Israel. A former minister of religious affairs who is close to Abbas went with his bodyguards to al-Aqsa Mosque; worshippers assaulted them, and they had to be hospitalised. When an Abbas emissary was dispatched to visit the murdered Palestinian boy's grieving family, he was shouted off the premises. As protests spread through Israel and Jerusalem, militants in Gaza from non-Hamas factions began firing rockets and mortars in solidarity. Sensing Israel's vulnerability and the Ramallah leadership's weakness, Hamas leaders called for the protests to grow into a third intifada. When the rocket fire increased, they found themselves drawn into a new confrontation: they couldn't be seen suppressing the rocket attacks while calling for a mass uprising. Israel's retaliation culminated in the 6 July bombings that killed seven Hamas militants, the largest number of fatalities inflicted on the group in several months. The next day Hamas began taking responsibility for the rockets. Israel then announced Operation Protective Edge. For Hamas, the choice wasn't so much between peace and war as between slow strangulation and a war that had a chance, however slim, of loosening the squeeze. It sees itself in a battle for its survival. Its future in Gaza hangs on the outcome. Like Israel, it's been careful to set rather limited aims, goals to which much of the international community is sympathetic. The primary objective is that Israel honour three past agreements: the Shalit prisoner exchange, including the release of the re-arrested prisoners; the November 2012 ceasefire, which calls for an end to Gaza's closure; and the April 2014 reconciliation agreement, which would allow the Palestinian government to pay salaries in Gaza, staff its borders, receive much needed construction materials and open the pedestrian crossing with Egypt. These are not unrealistic goals, and there are growing signs that Hamas stands a good chance of achieving some of them. Obama and Kerry have said they believe a ceasefire should be based on the November 2012 agreement. The US also changed its position on the payment of salaries, proposing in a draft framework for a ceasefire submitted to Israel on 25 July that funds be transferred to Gazan employees. Over the course of the war, Israel decided that it could solve its Gaza problem with help from the new government in Ramallah that it had formally boycotted. The Israeli defence minister said he hoped a ceasefire would place the new government's security forces at Gaza's border crossings. Netanyahu has begun to soften his tone towards Abbas. Near the end of the third week of fighting, Israel and the US quietly looked away as the Palestinian government made payments to all employees in Gaza for the first time. Israeli officials across the political spectrum have begun to admit privately that the previous policy towards Gaza was a mistake. All parties involved in mediating a ceasefire envision postwar arrangements that effectively strengthen the new Palestinian government and its role in Gaza -- and by extension Gaza itself. Achieving the release of the re-arrested prisoners will be much more difficult. But if the war drags on and a deeper ground incursion becomes more likely, Hamas's chances of capturing an Israeli soldier will increase. It has made at least four tries so far and may have succeeded in two of them; Israel denies the first was successful and, as this piece went to press, was searching for the second missing soldier. Few things would do more to discredit the Ramallah leadership than a new prisoner exchange deal with Hamas, even if on a smaller scale than the Shalit agreement. When Hamas announced it had captured a soldier on 20 July, crowds rushed to the streets of Gaza, Jerusalem and the West Bank, setting off fireworks and passing out sweets, with new hope that their friends and relatives in Israeli prisons would soon be released. Palestinian protests in solidarity with Gaza have spread. Hamas flags outnumbered those of Fatah at a recent protest in Nablus. The Ramallah leadership, not altogether convincingly, has adopted some of Hamas's rhetoric, using the word 'resistance' and praising Hamas's fight. Clashes have taken place in the West Bank and East Jerusalem nearly every night. On 24 July, during the Muslim holy night of Laylat al-Qadr, the Qalandiya checkpoint in northern Jerusalem was the site of the largest demonstration on the West Bank since the Second Intifada. Hamas knows it can't defeat the Israeli military, but the Gaza war holds out the possibility of a distant but no less important prize: stirring up the West Bank, and undermining the Ramallah leadership and the programme of perpetual negotiation, accommodation and US dependency that it stands for. For many Palestinians, Hamas has once again proved the comparative effectiveness of militancy. Tunnels, which have been central to its successes in the current fighting, have been the source of attacks against Israelis in Gaza since well before Israel's 2005 withdrawal. Hamas points to a series of tunnel-based attacks, including a deadly December 2004 explosion underneath an Israeli army post in southern Gaza, that helped precipitate Israel's pullout. Since the fighting in Gaza began this summer, Israel has not announced a single new settlement and has expressed willingness to make certain concessions to Palestinian demands -- achievements the Ramallah leadership has not been able to match in years of negotiations. The outcome of the fight will help determine the future path of the Palestinian national movement. The real barrier to a West Bank uprising has not been, as Hamas has claimed, Abbas's collaboration with Israel. It has been social and political fragmentation, and the widespread Palestinian acquiescence that national liberation should come second to the largely apolitical and technocratic projects of state-building and economic development. These are far greater obstacles for Hamas. To the extent that the recent fighting has instilled pride in Palestinians who say they'd grown accustomed to feeling shame at the way their leaders grovel at American and Israeli feet, Hamas's achievement has not been small. But Hamas has also risked a great deal. It stands to lose everything if Israel reassesses its long-standing reliance on it as Gaza's policeman, a strategy that has led it to keep Hamas strong enough in Gaza to exercise a near monopoly on the use of force. An irony of the recent weeks of ground combat is that Hamas's strong showing has put its position in Gaza at risk. Israel may decide it has become too big a threat. Hamas has slowed the Israeli ground incursion and inflicted dozens of losses on Israeli troops, far more than most expected. Two weeks after the ground incursion began, the IDF hadn't made it past the first line of densely populated urban housing. Thanks to the vast underground tunnel network leading not just into Israel but under Gaza, if Israel decides to enter the city centres, its casualties seem certain to increase. During Operation Cast Lead in 2008-09, Israel went far deeper into Gaza and lost only ten soldiers, four of them to friendly fire; today Israeli ground forces have lost more than sixty soldiers. Losses among Hamas militants so far appear to be manageable. For the first time in decades, Israel is defending itself against an army that has penetrated the 1967 borders, by means of tunnels and naval incursions. Hamas rockets produced in Gaza can now reach all of Israel's largest cities, including Haifa, and it has rocket-equipped drones. It was able to shut down Israel's main airport for two days. Israelis who live near Gaza have left their homes and are scared to go back since the IDF says that there are probably still tunnels it doesn't know about. Rockets from Gaza kept Israelis returning to shelters day after day, demonstrating the IDF's inability to deal with the threat. The war is estimated to have cost the country billions of dollars. The greatest costs, of course, have been borne by Gaza's civilians, who make up the vast majority of the more than 1600 lives lost by the time of the ceasefire announced and quickly broken on 1 August. The war has wiped out entire families, devastated neighbourhoods, destroyed homes, cut off all electricity and greatly limited access to water. It will take years for Gaza to recover, if indeed it ever does. And it seems unlikely that Hamas will be ready for another fight anytime soon. So it has every incentive to try to achieve its core objectives now, especially an end to Gaza's closure. Mediators are aiming to help the people of Gaza without appearing to hand Hamas a victory and Israel a defeat. At stake for Israel and Egypt is what a purported Hamas victory says about the future of the Muslim Brotherhood in the region. At stake for the Muslim Brotherhood's allies, Qatar and Turkey, is the meaning of a defeat. The perceived symbolism of the conflict has helped prolong it. The obvious solution is to let the new Palestinian government return to Gaza and reconstruct it. Israel can claim it is weakening Hamas by strengthening its enemies. Hamas can claim it won the recognition of the new government and a significant lifting of the blockade. This solution would of course have been available to Israel, the US, Egypt and the PA in the weeks and months before the war began, before so many lives were shattered. 1 August