Israel pulled its ground forces out of the Gaza Strip yesterday and started a 72-hour ceasefire with Hamas, mediated by Egypt, as a first step towards negotiations on a more enduring end to the month-old war.
Minutes before the truce began at 8am local time, Hamas launched a salvo of rockets, calling them revenge for Israel's "massacres". Israel's anti-missile system shot down one rocket over Jerusalem, police said.
Another hit a house in a town near Bethlehem in the occupied West Bank. There were no casualties.
Israeli armour and infantry withdrew from the Gaza Strip ahead of the truce, with a military spokesman saying their main goal of destroying cross-border infiltration tunnels had been completed. "Mission accomplished," the military tweeted.
Troops and tanks will be "redeployed in defensive positions outside the Gaza Strip and we will maintain those defensive positions," spokesman Lieutenant-Colonel Peter Lerner said, reflecting Israeli readiness to resume fighting if attacked.
Sami Abu Zuhri, a spokesman for the Islamist Hamas faction that rules Gaza, said Israel's offensive in the densely populated, coastal enclave was a "100 per cent failure".
Israel sent officials to join talks in Cairo to cement a longer-term deal during the course of the truce.
"The delegates left under an hour ago. I assume they've already arrived in Egypt," an Israeli official said.
In Gaza, where some half a million people have been displaced by a month of bloodshed, some residents, carrying mattresses and with children in tow, left UN shelters to trek back to neighbourhoods where whole blocks have been destroyed by Israeli shelling and the smell of decomposing bodies fills the air.
Sitting on a pile of debris on the edge of the northern town of Beit Lahiya, Zuhair Hjaila, a 33-year-old father of four, said he had lost his house and his supermarket.
"This is complete destruction," he said. "I never thought I would come back to find an earthquake zone."
Several previous truce attempts by Egypt and other regional powers, overseen by the United States and United Nations, failed to calm the worst Israeli-Palestinian fighting in two years.
An Israeli official said that in the hour before the ceasefire came into effect, the civilian airspace over Tel Aviv was closed as a precaution against Gaza rockets, and take offs and landings were delayed at Ben-Gurion Airport.
Gaza officials say the war has killed 1,867 Palestinians, most of them civilians.
Israel says 64 of its soldiers and three civilians have been killed since fighting began on July 8, after a surge in Palestinian rocket launches.
Hamas said it had informed Egypt "of its acceptance of a 72-hour period of calm", beginning yesterday.
The Palestinian cabinet issued a statement after its weekly meeting in Ramallah welcoming the ceasefire.
The US State Department also welcomed the truce and urged the parties to "respect it completely".
Spokeswoman Jen Psaki said Washington would continue its efforts to help the sides achieve a "durable, sustainable solution for the long term".