GAZA - A ceasefire between Israel and Hamas took hold on Thursday with scenes of joy among the ruins in Gaza over what Palestinians hailed as a victory, and both sides saying their fingers were still on the trigger. Quiet reigned on both sides of the border and Palestinians who had been under Israeli bombardment for eight days poured into the streets of Gaza for a celebratory rally, walking past wrecked houses and government buildings. But as a precaution, schools stayed closed in southern Israel, where nerves were jangled by warning sirens - a false alarm, the army said - after a constant rain of rockets during the most serious Israeli-Palestinian fighting in four years. Israel had launched its strikes last week with a declared aim of ending rocket attacks on its territory from Gaza, ruled by the Islamist militant group Hamas which denies Israel's right to exist. Hamas had responded with more rockets. The truce brokered by Egypt's new Islamist government, working with the United States, prevented - at least for now - an Israeli invasion of Gaza. Gaza medical officials said 162 Palestinians, more than half of them civilians including 37 children, were killed in the conflict. Nearly 1,400 rockets were fired into Israel, killing four civilians and two soldiers, including an officer who died on Thursday of wounds sustained on Wednesday, the Israeli army said. Israel's defense minister, Ehud Barak, said it dropped 1,000 times as much explosive on the Gaza Strip as had landed in Israel. Municipal workers in Gaza began cleaning streets and removing the rubble of buildings bombed in Israel's air strikes. Stores opened and people flocked to markets to buy food. "Israel learnt a lesson it will never forget," said 51-year-old Khalil al-Rass from Beach refugee camp in the city of Gaza. Jubilant crowds celebrated in Gaza, in a rare show of Palestinian unity five years after a brief civil war in which Hamas, elected to govern in a 2006 poll, wrested the territory from the rival Fatah movement that controls the West Bank. Most of those celebrating on Thursday waved green Hamas flags but there were also hundreds with the yellow emblems of Fatah, led by Western-backed President Mahmoud Abbas. He phoned Gaza chief and prime minister, Ismail Haniyeh, to "congratulate him on the victory and extend condolences to the families of the martyrs", Haniyeh's office said. In rocket-hit towns in southern Israel, schools remained closed as a precaution. Nerves were jangled when warning sirens sounded, in what the military quickly said was a false alarm. Trust was in short supply. The exiled leader of Hamas, Khaled Meshaal, said his Islamist movement would respect the truce if Israel did, but would respond to any violations. "If Israel complies, we are compliant. If it does not comply, our hands are on the trigger," he told a news conference in Cairo. Israeli Prime Minister Benjamin Netanyahu said he had agreed to "exhaust this opportunity for an extended truce", but told his people a tougher approach might be required in the future. Facing a national election in two months, he swiftly came under fire from opposition politicians who had rallied to his side during the fighting but now contend he emerged from the conflict with no real gains for Israel. "You don't settle with terrorism, you defeat it. And unfortunately, a decisive victory has not been achieved and we did not recharge our deterrence," Shaul Mofaz, leader of the main opposition Kadima party, wrote on his Facebook page. Israel planned to discharge gradually tens of thousands of reservists called up for a possible Gaza invasion. The first tanks were seen being ferried north, away from the border, on transporters on Thursday. In a speech, Haniyeh appealed to all Palestinian groups in Gaza to respect the ceasefire and cautioned that the "relevant government and security services" would monitor compliance. Both sides quickly began offering differing interpretations of the ceasefire, which highlighted the many actual or potential areas of discord. According to a text of the agreement seen by Reuters, both sides should halt all hostilities, with Israel desisting from incursions and targeting of individuals, while all Palestinian factions should cease rocket fire and cross-border attacks. The deal also provides for easing Israeli restrictions on Gaza's residents, who live in what British Prime Minister David Cameron has called an "open prison". The text said procedures for implementing this would be "dealt with after 24 hours from the start of the ceasefire". Israeli sources said Israel would not lift a blockade of the enclave it enforced after Hamas, which preaches the Jewish state's destruction, won a Palestinian election in 2006.