A joint US and UN statement urged all parties to "act with restraint" until the ceasefire begins. Talks on a more permanent truce are to start in Cairo.Since Israel began its offensive in Gaza on 8 July, more than 1,420 Palestinians have been killed, most of them civilians, health officials say.Sixty-one Israeli soldiers have died.Two Israeli civilians have been killed, as well as a Thai national in Israel.Israel says its operation in Gaza is designed to defend its population from attacks by Palestinian militants.Hamas wants a blockade of Gaza, maintained by both Israel and Egypt, to be lifted.'Much needed reprieve'Officials from both Israel and Hamas, which controls Gaza, confirmed that they had agreed to the ceasefire proposal brokered by the US and UN."During this time the forces on the ground will remain in place," US Secretary of State John Kerry and UN Secretary-General Ban Ki-moon said in the joint statement."We urge all parties to act with restraint until this humanitarian ceasefire begins, and to fully abide by their commitments during the ceasefire," the statement added."This ceasefire is critical to giving innocent civilians a much-needed reprieve from violence," the statement went on.It said that during the ceasefire period, civilians in Gaza would receive "urgently needed humanitarian relief, and the opportunity to carry out vital functions, including burying the dead, taking care of the injured and restocking food supplies".Israeli and Palestinian delegations will go to Cairo immediately for negotiations with the government of Egypt, at the invitation of Egypt, the statement said, with the aim of reaching "a durable ceasefire".Speaking in India, Mr Kerry warned that a break in the fighting did not guarantee an end to the conflict.He said that Israel would be able to continue destroying "those tunnels that are behind its lines". Israel says Hamas uses the tunnels to carry out attacks inside Israeli territory."This is not a time for congratulations or joy or anything except a serious determination - a focus by everybody to try to figure out the road ahead," Mr Kerry said."This is a respite. It is a moment of opportunity, not an end.'''Rockets within schools'After days of diplomatic despondency, this is an unforeseen breakthrough, the BBC's UN correspondent Nick Bryant reports from New York.Qatar and Turkey are reported to have been key to ceasefire efforts as they can communicate with Hamas, which has difficult relations with many other countries.Early on Friday, before the ceasefire took effect, eight Palestinians were killed by Israeli tank fire in the southern Gaza Strip, AFP news agency reported, citing local officials.Meanwhile, the Israel Defense Forces (IDF) said that five soldiers were killed by mortar fire near the Gaza border late on Thursday.UN High Commissioner for Human Rights Navi Pillay has accused both sides of violating the rules of war.She said Hamas had done so by "locating rockets within schools and hospitals, or even launching these rockets from densely populated areas", while Israel had attacked civilian areas of Gaza such as schools, hospitals, homes and UN facilities.An attack on a school in the Jabaliya refugee camp on Wednesday morning killed at least 16 displaced civilians, while the shelling of a market near Gaza City on the same day killed 17 people.The US described the shelling of the school as "totally indefensible" and urged Israel to do more to protect civilian life.White House spokesman Josh Earnest said there was little doubt that the shells were fired by the Israeli military.Israel said it would investigate the shelling of the school and apologise if Israeli fire was responsible.Speaking earlier on Thursday, Israeli Prime Minister Benjamin Netanyahu said the military would continue dismantling Hamas' tunnel network "with or without a ceasefire".Israel occupied Gaza in the 1967 Middle East war and only pulled its troops and settlers out in 2005.Israel considered this the end of the occupation, but it still exercises control over most of Gaza's borders, water and airspace. Egypt controls Gaza's southern border.lineThe BBC's Martin Patience at the scene in Gaza:In a sweltering apartment, 60 members of an extended family have sought shelter.It is a miserable scene. They have only one hour of electricity a day, no running water or food in the fridge.Even amid the darkness of war, the children still play games inside the apartment.Children five or older here have already lived through three conflicts during their short lives.One of the men told me that they had been ordered out of their neighbourhood by Israel. He said his home had been completely destroyed.The UN says up to a quarter of Gaza's population has been displaced by the fighting.More than 200,000 Palestinians are sheltering at UN schools. But the UN believes a similar number are crammed into homes of their relatives and friends across the territory.The BBC's Bethany Bell at the scene in Jerusalem:This is the longest conflict between Israel and militants in Gaza, but public backing in Israel for the army's offensive remains strong.That could start to change if the number of Israeli casualties increases significantly, or if there are kidnappings of Israeli soldiers in Gaza.But for now many Israelis support Mr Netanyahu's stated aim of destroying the cross-border tunnels.The threat of Palestinian gunmen coming up from below the ground into Israeli homes and communities to kill and abduct has shaken people here.Some Israelis are beginning to ask if the government and the army underestimated the threat of the tunnels, but there is little debate about the mission to destroy them.(BBC)Bakudaily.az