There are hopes that a cease-fire will end five days of fighting between Israel and Islamic Jihad militants in Gaza.
It got off to a shaky start, as both sides continued firing for two hours after the truce began on Saturday night.
At least 33 Palestinians have been killed since Tuesday in Gaza, where Israel says it bombed Islamic Jihad targets.
As a result, Palestinian rockets were fired at Israel, killing two people, one an Israeli and the other a Palestinian working in Israel.
Egypt led mediation efforts that urged both sides to abide by the ceasefire agreement.
Washington welcomed the ceasefire announcement and said US officials worked with regional partners to achieve the resolution.
A barrage of Palestinian rockets set off sirens in southern Israel, near Gaza, and the outskirts of the city of Tel Aviv before the truce took effect at 22:00 local time (19:00 GMT) on Saturday.
Minutes after their alleged start, militants fired more rockets into southern Israeli towns and the IDF launched air strikes on what it said were two Islamic Jihad rocket launchers in Gaza.
More rockets fired around 23:00 led to another round of airstrikes.
Despite the fighting, Israeli Prime Minister Benjamin Netanyahu’s office issued a statement confirming the ceasefire agreement and thanking Egypt for its “extensive efforts” to secure it.
She also said that Israel made it clear that its acceptance meant “quiet will be met with quiet, and if Israel is attacked or threatened, it will continue to do whatever it needs to in order to defend itself.”
The PIJ also confirmed the cease-fire, with a spokesman telling Reuters news agency: “We will abide by it as long as the occupation lasts. [Israel] abide by it.”
According to a transcript from Egyptian intelligence seen by the BBC, Palestinian militants and Israel agreed to stop actions targeting civilians and other personnel.
The BBC’s Jerusalem correspondent Yolande Neal says this form of wording appears to cover both the recent massive rocket fire from Gaza and Israel’s controversial policy of targeted killings of militant leaders.
Israel began its military operation in Gaza before dawn on Tuesday, killing three Islamic Jihad leaders in their homes as well as at least 10 civilians, including relatives and neighbors of the men.
Then Palestinian Islamic Jihad fighters launched a barrage of rockets into southern and central Israel, which they said was intended to avenge the dead.
At least 1,234 rockets and mortars have been fired from Gaza in all, with 976 of them crossing into Israeli territory, according to the Israeli military. Most were intercepted or landed in open areas, but some hit homes and other buildings.
A woman was killed when a rocket hit an apartment building in downtown Rehovot on Thursday, while a worker from Gaza was killed when he was hit by shrapnel from a rocket at a construction site in the southern Sdot Negev region.
The army says 221 of the rockets failed inside Gaza and killed four people there, including three children. Islamic Jihad denies the allegations.
Israel launched air strikes on 371 Islamic Jihad targets across Gaza, killing three more leaders and destroying what it said were the group’s rocket launch sites and command centers.
Local health officials said half of the 33 deaths in Gaza were civilians, including seven children and four women.
“Infuriatingly humble alcohol fanatic. Unapologetic beer practitioner. Analyst.”
Covid investigation: Government ‘potentially loses legal action’, says minister
BRICS ministers show their strength as Putin’s arrest warrant looms
The pledge to fight climate change is to send money to exotic places