Gaza conflict: Israel and Palestinians agree long-term truce
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 - mostly Palestinians - dead, was brokered by Egypt and began at 19:00 (16:00 GMT) on Tuesday.
Hamas said the deal represented a "victory for the resistance".
Israel is to ease its blockade of Gaza to allow in aid and building materials, Israeli officials said.
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 US gave the full backing to the deal, with State Department spokeswoman Jen Psaki saying: "We strongly support the ceasefire announcement."
UN Secretary General Ban Ki-moon also welcomed the truce. But in a statement via his spokesman, Mr Ban warned that "any peace effort that does not tackle the root causes of the crisis will do little more than set the stage for the next cycle of violence".
The breakthrough came as both Israel and the Palestinians continued to trade fire.
A last-minute volley of mortar shells from Gaza killed two Israeli civilians 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.
A month later Israel and the Palestinian factions would discuss the construction of a seaport and airport in Gaza and the freeing of about 100 prisoners.
Israel and Egypt were also said to be demanding guarantees that weapons would not be smuggled into Gaza.
The announcement was greeted by celebratory gunfire on the streets of Gaza City.
However, sirens warning of rockets reportedly continued to sound in southern Israel.
Analysis: Kevin Connolly, BBC News, Jerusalem
On both sides of the border that divides Israel from Gaza there will be immediate relief that the threat of attack and shadows of fear have been lifted. But colder political calculations are already being made, too.
There have been small celebrations in the streets of Gaza City hailing a "victory" but the truth is that Hamas has not achieved the headline-making concessions it was demanding in return for a ceasefire agreement.
So, there is no deal on the opening of a sea terminal or an airport at this stage. How ordinary Palestinians view the deal probably depends on how quickly their tightly-controlled borders are opened and how wide.
Israel speaks of Hamas having suffered a "devastating" blow during this military campaign - but the truth is that the Palestinian militants demonstrated that they have enough resilience - and enough rockets - to sustain a surprisingly long campaign.
Israeli PM Benjamin Netanyahu can expect fierce criticism from other right-wing Israeli politicians for agreeing to what feels like an inconclusive outcome rather than attempting to inflict a decisive defeat on Hamas.
Other ceasefires have collapsed after a few days - the strongest factor in favour of this one is a kind of mutual war-weariness among both civilian populations.
A spokesman for Hamas, which controls Gaza, said: "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 six Israeli civilians and a Thai national.
Early on Tuesday, Israeli jets bombed two high-rise buildings in Gaza City, containing flats and offices.
No-one was reported killed as residents managed to flee both buildings after the Israeli military warned them to leave.
Hamas, citing Palestinian casualties, has accused Israel of an "unprecedented act of revenge" against civilians.
But Israeli military spokesman Lt Col Peter Lerner told the Associated Press 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".