GAZA CITY - Palestinian leaders in Gaza agreed to a ceasefire with Israel on Monday to end a deadly two-day escalation in violence that threatened to widen into a fourth war between them since 2008.
An Israeli military spokeswoman declined to comment on the deal, but there appeared to have been no rocket fire or Israeli strikes in the hours after it was due to take effect, a correspondent in Gaza said.
Israel also lifted restrictions on civilian movements in communities around the Gaza border on Monday morning.
Egypt brokered the agreement to cease hostilities from 4:30 am (0130 GMT), an official from the strip's Islamist rulers Hamas and another from its allied group Islamic Jihad said on condition of anonymity.
An Egyptian official also confirmed the deal on condition of anonymity.
It came after the most serious flare-up in violence between Israel and Palestinian militants in Gaza since a 2014 war.
The escalation began Saturday with massive rocket fire from Gaza, drawing waves of Israeli retaliatory strikes, and continued throughout Sunday.
At least 23 Palestinians, including at least nine militants, were killed.
Four Israelis civilians were killed.
The flare-up came as Hamas sought further steps from Israel toward easing its blockade under a previous ceasefire brokered by Egypt and the United Nations.
Israel at the same time faced pressure to restore calm and put an end to the rockets hitting communities in the country's south.
It commemorates its Memorial and Independence Days later this week and is due to host the Eurovision song contest in Tel Aviv from May 14-18, which is expected to draw thousands to Israel.
On the Gazan side, the Muslim holy month of Ramadan began Monday.
Palestinian officials in Gaza accused Israel of not taking steps to ease its blockade as promised under previous ceasefire deals.
The Islamic Jihad official said the new truce agreement was again based on Israel easing its blockade.
Among the steps, he said, were the relaxing of limits on fishing and improvements in Gaza's electricity and fuel situation.
Israeli opposition politicians -- and at least one from Prime Minister Benjamin Netanyahu's own party -- criticised the agreement.
Former military chief Benny Gantz, who challenged Netanyahu in Israel's April 9 general elections, called it "another capitulation to blackmail by Hamas and terrorist organisations."
Brink of war
Israel and Palestinian militants in Gaza have fought three wars since 2008 and the escalation brought them to the brink of another.
The Palestinian dead included a commander for Hamas's armed wing who Israel said it targeted due to his role in transferring money from Iran to militant groups in Gaza.
It was a rare admission of a targeted killing by Israel's army.
Israel said its strikes were in response to Hamas and Islamic Jihad firing some 690 rockets or mortars across the border since Saturday, with air defences intercepting more than 240 of them.
In addition to those killed and injured, the rockets repeatedly set off air raid alarms in southern Israel and sent residents running to shelters while also damaging houses. At least 35 of the rockets fell in urban areas, according to the army.
The army said its tanks and planes hit some 350 militant targets in Gaza in response.
It targeted militant sites and in some cases militants themselves as well as their homes if they were found to be storing weapons, military spokesman Jonathan Conricus said.
Several buildings in Gaza City were destroyed, including one Israel said included Hamas military intelligence and security offices.
Turkey said its state news agency Anadolu had an office in the building and strongly denounced the strike.
Gaza's health ministry said the dead from the Israeli strikes included a 14-month-old baby and a pregnant woman, 37. It first identified the woman as the baby's mother, but the family later clarified she was the aunt.
Israel strongly disputed the claim, with Conricus saying that based on intelligence the deaths of the woman and baby were not due to an Israeli strike.
"Their unfortunate death was not a result of (Israeli) weaponry but a Hamas rocket that was fired and exploded not where it was supposed to," he said.
The Gazan ministry reported late Sunday that another four-month-old baby was among those killed in Israeli strikes in the northern Gaza Strip. Israel's army had no comment.
On Sunday, Hamas and Islamic Jihad said their armed wings had targeted an Israeli army vehicle with a Kornet anti-tank missile.
Conricus said a Kornet missile had hit a vehicle and killed an Israeli civilian.
Calls for calm
Egyptian and UN officials held talks throughout to reach a truce, as they have done repeatedly in the past, and there were international calls for calm.
US President Donald Trump meanwhile assured Israel on Sunday that it had Washington's full support against "these terrorist acts."
The escalation followed a gradual uptick in violence that threatened a previous ceasefire, including Friday clashes along the Gaza border that were the most violent in weeks.
A ceasefire between Israel and Hamas, brokered by Egypt and the United Nations, had led to relative calm around Israel's election last month.
That truce saw Israel allow Qatar to provide millions of dollars in aid to Gaza, paying salaries and financing fuel purchases to ease severe electricity shortages.