Israel and Hamas have agreed to an unconditional 72-hour humanitarian ceasefire in Gaza from 08:00 (05:00 GMT) on Friday.
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, 1,422 Palestinians have been killed, most of them civilians, according to Gaza’s health ministry.
Fifty-six 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.
‘Much needed reprieve’
Officials from both Israel and Hamas 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 tunnels “behind its lines” which Israel says are used by Hamas 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,” he said.
“This is a respite. It is a moment of opportunity, not an end.”
‘Rockets within schools’
A US state department official, speaking on condition of anonymity, said that developing relationships with Qatar and Turkey, who could communicate with Hamas, had been key to ceasefire efforts.
Seventy-two hours was considered the minimum amount of time needed to get negotiations started, the official added.
UN High Commissioner for Human Rights Navi Pillay on Thursday 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”. BBC