The ceasefire announcement was celebrated by Palestinians in Gaza City
A long-term ceasefire has been agreed between Israel and Palestinian militants in the Gaza Strip.
The truce, ending seven weeks of fighting that has left more than 2,200 people dead, was brokered by Egypt and began at 19:00 local time (16:00 GMT).
Hamas deputy political leader Moussa Abu Marzouk said the deal represented a "victory for the resistance".
Israeli government officials said it would ease its blockade of Gaza to allow in aid and building materials.
Indirect talks on more contentious issues, including Israel's call for militant groups in Gaza to disarm, will begin in Cairo within a month.
The breakthrough came as both sides continued to trade fire.
A last-minute volley of mortar shells from Gaza killed an Israeli civilian and wounded six others in Eshkol Regional Council, medics told the BBC.
Earlier on Tuesday, at least six Palestinians were killed in a series of Israeli air strikes in Gaza, Palestinian officials said.
Palestinian officials said Egypt's ceasefire proposal called for an indefinite end to hostilities, the immediate opening of Gaza's crossings with Israel and Egypt, and an extension of the territory's Mediterranean fishing zone.
Before the breakthrough, high-rise buildings in Gaza were bombed and more rockets hit Israel
Mourners at the funeral of a Hamas militant - Israel said the group had been dealt a "devastating blow"
A month later, the officials added, Israel and the Palestinian factions would discuss the construction of a seaport and airport in Gaza and the freeing of about 100 prisoners released in exchange for Gilad Shalit in 2011 who were recently rearrested in the occupied West Bank.
Israel and Egypt were also said to be demanding guarantees that weapons would not be smuggled into Gaza.
The ceasefire announcement was greeted by celebratory gunfire on the streets of Gaza City.
Sirens warning of rockets reportedly continued to sound in southern Israel. An Israeli military spokeswoman said the army was checking whether any rockets had landed.
Analysis: Kevin Connolly, BBC News, Jerusalem
The ceasefire deal combines elements of possible agreements which have been under discussion for weeks.
At the core of it will be an end to hostilities in return for an easing of border restrictions on Gaza, which will allow in humanitarian supplies and desperately-needed materials for reconstruction.
Longer-term issues like the Hamas demand for an airport and a sea terminal will be pushed back to later in the talks process, perhaps by a month or so.
It is a formula that allows the violence to end without a full resolution of all the issues which have divided Israel and the Palestinian militants for many years.
Earlier ceasefires in this conflict have collapsed - the diplomatic hope now is that a kind of mutual war-weariness will give this deal a better chance of success.
A spokesman for Hamas, which dominates the territory, told a news conference: "We are here today to declare the victory of the resistance, the victory of Gaza, with the help of God, and the steadfastness of our people and the noble resistance."
A senior Israeli official told the BBC: "Israel accepts the Egyptian initiative for an unlimited ceasefire in Gaza.
"The proposal does not include Hamas demands regarding a port, an airport, prisoners and funds. The sides will discuss their demands through Egypt within a month."
The official said Hamas had been dealt a "devastating blow", with 5,200 "terror sites" targeted and 1,000 "terrorists" killed.
Israel launched Operation Protective Edge on 8 July with the stated aim of ending rocket fire. It was later expanded to include the destruction of tunnels used by militants for cross-border attacks.
At least 2,140 people, most of them civilians, have been killed in Gaza, according to the Palestinian health ministry.
The Israeli authorities say 64 Israeli soldiers have been killed, along with three Israeli civilians and a Thai national.
Early on Tuesday, Israeli jets bombed two high-rise buildings in Gaza City. The Basha Tower, containing flats and offices, was flattened and the Italian Complex, with homes, shops and offices, was severely damaged.
Israel launched Operation Protective Edge on 8 July with the stated aim of ending rocket fire
Israel's prime minister said on Sunday the military operation would "continue until its aims are achieved"
No-one was reported killed as residents managed to flee both buildings after the Israeli military warned them to leave.
However, 20 people were injured in the attack on the Italian Complex, and at least six others were killed in Israeli strikes elsewhere, medics said.
Hamas, the militant Islamist movement that dominates Gaza, accused Israel of an "unprecedented act of revenge" against civilians.
But Israeli military spokesman Lt Col Peter Lerner told the Associated Press that the strikes were "a direct result of Hamas' decision to situate their terrorist infrastructure within the civilian sphere, including schools, hospitals and high-rise buildings".