As a cease-fire deal between Hamas and Israel took shape on Thursday, diplomats and Middle East experts cautioned that the last moments before any agreement are fraught with risk and uncertainty.
Details of the agreement were unclear, but at its most basic, a cease-fire would mean that Hamas, the militant group that controls Gaza, would halt rocket fire at Israeli cities and towns, while Israel would stop its bombardment of Gaza, according to officials familiar with the negotiations. During talks this week, Israel was also demanding that Hamas stop digging attack tunnels toward Israel and halt violent demonstrations on the Gaza-Israeli border, said the officials, who spoke on the condition of anonymity because they were discussing continuing talks.
Hamas, in turn, called for Israel to allow goods and money to enter Gaza.
An agreement could also aim to include later steps, including returning the bodies of two soldiers and two Israeli civilians held by Hamas.
Cease-fire agreements can be precarious things. In the hours before a truce is to take effect, one side — or both — can attempt to strike a final set of blows, but striking too hard can cause the deal to collapse. After announcing the agreement on Thursday, Prime Minister Benjamin Netanyahu’s office warned that “the reality on the ground will determine the continuation of the campaign.”
Similarly, a Hamas spokesman, Taher al-Nono, said on Thursday, “the Palestinian resistance will abide by this agreement as long as the occupation abides by it.”
Officially, Israel denied earlier this week that negotiations were taking place or that a deal was imminent, but that may have been a tactic designed to put pressure on Hamas.
The senior Israeli representative in the negotiations — which Egypt is helping coordinate — has been the national security adviser, Meir Ben-Shabbat, who is considered close to Mr. Netanyahu.
The two senior Hamas figures involved in the negotiations have close ties to Egyptian intelligence.
The Egyptians have sometimes had trouble contacting senior Hamas officials, who have often fled underground and ceased using electronic devices because they fear Israeli attempts to kill them.