Israel and Hamas have agreed to a 72-hour ceasefire in their conflict in the Gaza Strip starting on Friday morning, US Secretary of State John Kerry and UN Secretary-General Ban Ki-moon have announced.
The ceasefire will begin at 8am local time (0500 GMT) on Friday, 1 August, they said in a joint statement.
The statement said "forces on the ground will remain in place" during the truce, implying that Israeli ground forces will not withdraw.
"We urge all parties to act with restraint until this humanitarian ceasefire begins, and to fully abide by their commitments during the ceasefire," Mr Kerry and Mr Ban said.
"This ceasefire is critical to giving innocent civilians a much-needed reprieve from violence."
Earlier this evening, the US described the shelling of a UN facility in Gaza by the Israeli military is "totally unacceptable and totally indefensible".
A spokesperson for the White House said Israel needs to do more to protect innocent civilians.
"Israel talks frequently about the importance it places on sparing civilian lives but the United States believes its government and military are not doing enough to that end, spokesperson Josh Earnest said at a news briefing.
Meanwhile, the head of the main UN relief agency told the UN Security Council that Palestinians are "facing a precipice" in Gaza,
With more than 220,000 Palestinians already sheltering in UN facilities - four times the number from the last Gaza conflict in 2008-2009 - Philippe Krahenbuhl said he had reached a 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," the head of the UN Palestinian refugee agency UNRWA told the 15-member Council.
"It is past time for an immediate and unconditional ceasefire as called for by the Council," he said.
"The illegal blockade of Gaza must be lifted."
More than 1,400 Palestinians, mostly civilians, have died in the fighting, along with 56 Israelis, most of them soldiers.
Earlier today Israel said it would not pull troops from Gaza until they finish destroying a network of cross-border tunnels, despite sharp United Nations criticism over the Palestinian civilian death toll.
Washington said it had agreed to restock Israel's dwindling ammunition supplies, despite increasing international concern over the death toll in Gaza, where 1,395 people have been killed in 24 days of violence.
UN figures indicate two-thirds of the victims were civilians. Of the civilian dead, nearly half were women and children.
Israel has lost 56 soldiers and three civilians in the conflict.
Earlier, UN human rights chief Navi Pillay criticised what she said was Israel's "deliberate defiance" of international law.
She lambasted the country's attacks on homes, schools, hospitals and UN facilities which are sheltering 250,000 civilians in Gaza.
"There appears to be deliberate defiance of obligations that international law imposes on Israel," she told reporters.
Ms Pillay said that repeated calls to respect the laws of war had gone unheeded during the latest crisis and previous spikes in the Israeli-Hamas conflict.
Israel has pressed ahead with its offensive and has mobilised an extra 16,000 reservists.
Israeli Prime Minister Benjamin Netanyahu's security cabinet yesterday approved continuing the assault launched on 8 July in response to a surge of rocket attacks by Hamas.
But Israel also sent a delegation to Egypt, which has been trying to broker a ceasefire.
Seanad recalled to debate Gaza conflict
Elsewhere, the Seanad sat this afternoon to debate the crises in Gaza and Ukraine, having been recalled from its summer break.
Minister for Foreign Affairs Charlie Flanagan said Israel is responding disproportionately to Hamas rocket attacks.
Mr Flanagan said any use of military force in self-defence must be in accordance with international laws.
He said the level of casualties was unacceptable and illustrated this was not the case. He said Hamas must renounce violence.
On Ireland's controversial abstention from a UN resolution, Mr Flanagan said the decision to abstain was a collective EU decision, and was only taken after prolonged deliberations.
He said the EU partners could not resolve differences over how to conduct the investigation.
The minister said if they had not all agreed to abstain, it was highly likely that a number of EU states would have voted against the resolution, which he said would have reduced EU influence even further.
Labour leader in the Seanad Ivana Bacik said she was disappointed with how Ireland's abstention on the UN vote looked, however she said she appreciated EU unity must be preserved.
But she said Ireland needed to push more strongly within the EU for a form of censure for Israel.
Independent Senator David Norris said Ireland's abstention was shameful and he said it was better to be one country in the right, rather than siding with all the rest in the wrong.
He said Israel was unscrupulously using the Holocaust to justify its actions and he said that rag must be torn away.
Fine Gael leader in the Seanad Maurice Cummins said 52 of the 60 senators present for today's debate.
Palestinian Ambassador to Ireland Ahmed Abdelrazek was in the public gallery observing the debate.