GAZA CITY - Israel and Hamas agreed to begin a 72-hour ceasefire from 0500 GMT Friday, alongside a diplomatic push for a more durable end to the bloodshed after almost four weeks of fighting.
Just hours before the ceasefire came into force 14 more Palestinians were reported killed by Israeli tank and air fire in the Gaza Strip.
Meanwhile the Israeli army said that five of its soldiers died in mortar fire near the Gaza border, underlining the need for a negotiated truce.
Hopes of an end to the bloodshed rose early Friday after US Secretary of State John Kerry announced that Israel and Hamas had agreed a three-day ceasefire.
Both sides swiftly confirmed their commitment to a truce, after 25 days of bloody confrontation.
While the proposal was accepted by Hamas, a spokesman stressed it was dependent on Israel reciprocating.
"Hamas and all the resistance movements have accepted a 72-hour humanitarian ceasefire from 8:00am Friday which will be respected by all these movements if the other party also observes the ceasefire," Fawzi Barhum said.
"Israel has accepted the US/UN proposal for a 72-hour humanitarian ceasefire beginning 8:00am Friday (local time)," a source in the Israeli prime minister's office said.
An Israeli artillery gun fires a 155mm shell towards targets in the Gaza Strip from their position near Israel's border with the Gaza Strip on Thursday
Speaking in New Delhi earlier, Kerry said after the ceasefire went into force, Israeli and Palestinian representatives, including from Hamas, would also begin more durable truce talks in Cairo in a move confirmed by Egypt.
But he said Israeli forces would remain inside Gaza.
Earlier Thursday, Israel vowed it would not accept any ceasefire that did not allow troops to continue destroying tunnels used by militants to attack Israel.
The ceasefire was a joint US-UN initiative and will give civilians "a much needed reprieve", Kerry said.
"This is a respite, a moment of opportunity -- not an end. It's not a solution," he warned, saying Israel would still be allowed to carry out "defensive" operations to destroy tunnels.
The 14 latest Palestinian victims included a woman and at least two children killed by Israeli tank fire in the southern Gaza Strip early Friday, a spokesman for the local emergency services said.
Six of them were killed in an Israeli air strike in the same area, the spokesman said.
Their deaths bring the toll on the Palestinian side to 1,450 since the Israeli offensive in the Gaza Strip began on July 8.
UN figures show that around two-thirds of the victims were civilians, drawing sharp criticism from around the world.
Meanwhile the Israeli army said in a statement that "5 IDF (army) soldiers were killed during operational activity along the border with the Gaza Strip when a mortar was fired at the forces."
Their deaths bring the Israeli military toll to 61, since the beginning of "Operation Protective Edge," the statement added.
The ceasefire announcement came after the UN Security Council expressed "grave disappointment" that repeated calls for a truce had not been heeded, and demanded there be a series of humanitarian breaks to ease conditions for civilians trapped in the war-torn territory.
A displaced Palestinian boy looks out from a makeshift tent at the al-Shifa hospital in Gaza City where many Palestinians have have taken refuge after fleeing attacks in the Shejaiya neighbourhood of the city
Egypt has invited Israel and the Palestinian Authority to send delegates to Cairo for truce talks, after the 72-hour ceasefire in Gaza was announced.
"Egypt emphasises the importance of both sides committing to the ceasefire so the negotiations can take place in a favourable atmosphere," the Egyptian foreign ministry said in a statement.
The delegations are expected to start arriving in Cairo later Friday.
Frank Lowenstein, the US Middle East envoy, was also expected to depart on Friday for the Egyptian capital, a State Department official said.
Despite rising international concern over the civilian death toll in Gaza, Washington said it had agreed to restock Israel's dwindling munitions supplies.
The announcement came as the White House said there was little doubt that Israeli artillery was the source of a "totally indefensible" strike on a UN school in northern Gaza that killed 16 people on Wednesday.
The school was sheltering more than 3,000 Palestinians made homeless by the relentless fighting which on Friday entered its 25th day.
"It does not appear there's a lot of doubt about whose artillery was involved in this incident," spokesman Josh Earnest said.
The Israeli army has suggested the deaths may have been the result of a misfired Palestinian rocket.
'Facing a precipice'
A female Israeli soldier stands next to an armoured vehicle during clashes with Palestinian protesters following a demonstration in the West Bank village of Bilin
The European Union also condemned the hit on the school, saying it was "unacceptable" that those who had been forced out of their homes by the fighting -- and at the request of the Israeli army -- had been killed.
"These incidents must be investigated with immediate effect," it said.
With one in seven people of Gaza's population of 1.8 million people forced to flee their homes due to the intensive fighting, the UN agency for Palestinian refugees, which is sheltering almost all of them, warned it was stretched to breaking point.
"I believe the population is facing a precipice and appeal to the international community to take the steps necessary to address this extreme situation," UNRWA Commissioner General Pierre Krähenbühl told the Security Council.
There was no let-up Thursday in the bloodshed with at least 50 Palestinians killed, another 14 dying from injuries suffered in earlier attacks and a growing number of bodies pulled from under rubble in areas near Khan Yunis, medics said.