Israel and militant factions in the Gaza Strip have agreed to an Egyptian-brokered truce to end four days of cross-border violence in which 25 Palestinians have been killed, a senior Egyptian security official told Reuters on Tuesday.
The official said in a telephone call from Cairo that both sides had "agreed to end the current operations", with Israel giving an unusual undertaking to "stop assassinations", and an overall agreement "to begin a comprehensive and mutual calm".
The agreement was set to take effect at 1am local time (2300 GMT). Previous ceasefire deals after earlier rounds of fighting have often got off to a shaky start.
"There is an understanding," Israeli Civil Defence Minister Matan Vilnai told Israel Radio. "At the moment the direction is toward calm and it appears, unless there are last minute developments, that this round is now behind us."
A Palestinian official close to the talks said "the factions are committed", alluding to the Islamic Jihad and Popular Resistance Committees, who were most active in the fighting, but that these groups were waiting to see how Israel would respond.
Gaza's Hamas Islamist leadership, whose own cadres have kept out of the fighting and seemed eager to avoid a larger conflict with Israel, had confirmed on Sunday that Egypt was working on a deal to stop the violence.
The truce agreement followed appeals from world powers - the United States, the United Nations, France, European Union and the Arab League - for both sides to exercise restraint.
Israel said Gaza militants had fired about 200 rockets at its southern towns and cities from Gaza since fighting flared on Friday after Israel killed a senior militant it accused of plotting to attack Israel from Egyptian territory.
Eight Israelis were injured by the rockets, dozens of which were shot down harmlessly by Israel's "Iron Dome" missile interceptor system.
"The Israeli army will continue to attack the terrorists in Gaza with strength and determination," Prime Minister Benjamin Netanyahu told lawmakers in his Likud party on Sunday.
But while Israel was keen to bar rocket fire at its homefront there seemed to be little public enthusiasm for waging a longer military campaign reminiscent of a 2008-2009 offensive in which 1,400 Palestinians and 13 Israelis were killed.
Twenty of the Palestinians killed in the Hamas-controlled enclave since fighting flared on Friday were militants and five were civilians, according to medical officials.
At least 80 Palestinians, mostly civilians, have been wounded in the violence which also paralysed life in much of southern Israel, forcing schools to close and hundreds of thousands to remain indoors.
Gaza, home to 1.7 million people, was under Israeli occupation from 1967 until 2005 and remains under blockade.
Hamas has controlled Gaza since seizing it from West Bank-based Palestinian President Mahmoud Abbas in 2007, and is fighting for an independent Palestinian state but has shunned the stalled peace process supervised by international powers and refuses to recognize the Jewish state.
Violent flareups have been frequent between Israel and Gaza's militant factions in the past few years, in most cases lasting no longer than a week.
The last conflagration of this intensity was in August after a cross-border attack launched from Egypt killed eight in Israel and Israel struck back killing 15 Gaza gunmen.