TEL AVIV – Israel and Palestinian Islamic Jihad have agreed to a ceasefire ending five days of fighting between the two sides, a US official and an Israeli official told NBC News on Saturday.

The ceasefire was mediated by Egypt and will begin at 10:00 p.m. local time.

“Now, this agreement has been reached thanks to the continuous effort of Egypt. We appreciate this effort,» Mohamad al-Hindi told the Al Kahera Wal Nas channel.

There was no immediate comment from Israeli Prime Minister Benjamin Netanyahu or other officials.

Cairo called on all parties to adhere to the deal, Egypt’s Al-Qahera News television channel reported.

The fighting has killed 33 Palestinians inside Gaza, including at least 13 civilians. Two people were killed by rocket fire in Israel, including an 80-year-old Israeli woman and a Palestinian man from Gaza who had a permit to work in Israel.

The latest violence erupted on Tuesday when Israeli airstrikes killed three top Islamic Jihad commanders. Israel said the airstrikes were in response to an earlier barrage of rockets the previous week and that its strikes have focused on Islamic Jihad targets. But Gaza residents said the homes of people not involved in the fighting had also been hit.

In a reminder of the arson situation in the occupied West Bank, the Israeli army raided the Balata refugee camp near the northern city of Nablus, sparking a firefight that killed two Palestinians. In a separate incident near the northern city of Jenin, Israeli police said they shot and killed a suspected Palestinian attacker who ran toward soldiers brandishing a knife.

Meanwhile, the Israeli army shelled an apartment belonging to Islamic Jihad commander Mohammed Abu Al Atta, among other targets, including rocket launchers, early Saturday, he said.

An elderly woman gesticulates among the rubble of a destroyed building in the Gaza Strip
A woman sits in the rubble of a destroyed building in the Gaza Strip on Saturday.Said Khatib/AFP via Getty Images

Islamic Jihad militants fired several volleys of rockets into southern Israel, where tens of thousands of Israelis were told to stay close to safe rooms and bomb shelters. Hundreds of residents near the border were evacuated to hotels further north.

Israel’s military chief, Lt. Gen. Herzi Halevi, said Israel had made «significant gains» during the fighting and said the army was ready to continue its campaign.

«We are prepared to continue with targeted attacks and hitting in an increasing and precise manner,» he added.

Hostilities broke out on Tuesday. when Israel attacked and killed three senior Islamic Jihad commanders who it said were responsible for firing rockets into the country last week. At least 10 civilians, including women, young children and uninvolved neighbors, were killed in those initial attacks, drawing regional condemnation.

In recent days, Israel has carried out more airstrikes, killing other top Islamic Jihad commanders and destroying its command centers and rocket launch sites.

On Saturday, the Palestinians ventured out to assess the damage caused by Israeli warplanes and salvage what they could. A man carefully pulled out documents from under the rubble. Another took a mattress.

Four houses in densely populated residential neighborhoods were reduced to dust in pre-dawn attacks. The Israeli army claimed that the houses attacked belonged to or were used by Islamic Jihad militants. Residents denied the army’s claims and said they had no idea why their houses were attacked.

“We don’t have rocket launch pads at all. This is a residential area,” Awni Obaid said, standing next to the rubble of what was once his three-story house in the central city of Deir al-Balah.

The nearby home of his relative, Jehad Obaid, was also razed. He was standing about a hundred yards away when his apartment was bombed.

“I felt like throwing up from the dust,” he said. “This is extraordinary hate. They say they don’t hit children, but what we see is madness, destruction.»

Islamic Jihad has retaliated by firing more than 1,200 rockets into southern and central Israel, according to the army. On Friday, the group stepped up its attacks and fired rockets toward Jerusalem, sounding air-raid sirens in Israeli settlements south of the disputed capital.

Most of the rockets fell inside Gaza, landed in open areas or were intercepted by Israel’s Iron Dome air defense system. But on Thursday, a rocket tore through missile defenses and tore through a house in the central city of Rehovot, killing an 80-year-old woman and wounding several others.

Hamas, the largest militant group to have fought four wars against Israel since it seized control of Gaza in 2007, praised Islamic Jihad’s attacks but stayed on the sidelines, according to Israeli military officials, limiting the scope of the conflict.

With the de facto government blamed for the dire conditions in the blockaded Gaza Strip, Hamas has recently tried to keep its conflict with Israel at bay. Islamic Jihad, on the other hand, a most ideological and rebellious militant group married to violence, has taken the lead in recent rounds of fighting with Israel.

Sánchez and Goldman reported from Tel Aviv; and Burke of Pittsburgh.