Warring Palestinian factions have reconciled in a long-awaited pact that their leaders hope will draw a line under four years of bitter division that followed a short but bloody civil war.
Palestinian President Mahmoud Abbas, who heads Fatah, and Khaled Meshaal, the Damascus-based leader of Hamas, the Islamist group in charge of Gaza, joined yesterday in Cairo to ratify the unity deal, seen by most Palestinians as a crucial step towards achieving a lasting peace agreement with Israel. But the Israeli Prime Minister, Benjamin Netanyahu, immediately denounced the pact during a visit to London as a "tremendous blow for peace and a great victory for terrorism."
After months of fruitless talks, a small team of negotiators helped put together the deal during secret meetings in Ramallah, Gaza, Damascus and Cairo, culminating in its signing by lower-ranking party officials the day before. Another 11 factions have also signed.
"Hamas was ready to pay any price for internal Palestinian reconciliation," Mr Meshaal said in his opening remarks at the ceremony in Cairo, alluding to reports that the Islamist party had instigated the surprise rapprochement. "The only battle of the Palestinians is against Israel."
Pledging his commitment to the deal, Mr Abbas said "We turn forever the black page of division. We are certain of success so long as we are united."
But the accord is a risky gamble for the pro-Western leader, who has abandoned stalled peace talks with Israel to pursue a diplomatic offensive, which is expected to culminate in a move in September to seek United Nations recognition of a Palestinian state based on the borders of 1967.
While the rapprochement would bolster Mr Abbas's claim to represent all Palestinians, it could also alienate Western support and threaten millions of dollars in financial aid. At Israel's urging, the United States and Britain both regard Hamas as a terrorist group.
Ordinary Palestinians have longed for the parties to patch up their rift, seen as complicating efforts to forge peace with Israel. Few could contemplate a deal between the Fatah-dominated Palestinian Authority (PA) and Israel that would leave the fate of Gaza unsettled.
When the accord was first unveiled last week, Mr Netanyahu warned it could lead to a Hamas takeover of the West Bank and commanded Mr Abbas to reject Hamas for peace. The Palestinian leader responded yesterday by telling Israel to choose "between settlements and peace", accusing his counterpart of using the reconciliation as "a pretext to avoid peace negotiations".
Talks collapsed last September over Israel's expansion of settlements in the occupied West Bank, where Palestinians hope to build their future state.
In Gaza, dozens of supporters turned out to celebrate the pact. As the euphoria surrounding the signing of the accord subsides, the attention of many will now be on whether the two factions can resolve their deep-seated differences.
Even a seemingly simple issue of protocol confounded officials in Cairo yesterday when Mr Abbas apparently refused to allow Mr Meshaal to sit alongside him on the podium. Among the PA's most difficult tasks will be how to integrate Hamas's military wing into its security forces, a task complicated by the fact that it has long cracked down on the Islamists in the West Bank.
Yuval Diskin, the outgoing chief of Israel's internal security services, described the accord yesterday as a "spicy drama, nothing more", saying a unity government would "have to answer complex questions, each party will pull in its own direction".
But those who worked behind the scenes to achieve the accord were more confident. "Of course there is a gap in terms of personalities, thinking and priorities," said Mahdi Abdel Hadi, a political analyst who shuttled between the parties in recent weeks. "But Hamas arrived today more open, more willing and more at ease [than ever before]."
The deal envisages that a caretaker government comprised of independents will be established in the next few weeks with the task of preparing for parliamentary and presidential elections.
Fatah and Hamas briefly joined in a unity government in 2007 that soon collapsed amid bitter fighting. Hamas seized control of Gaza, effectively splitting the two territories into separately-governed entities.