JERUSALEM — Israel's military said Friday it was investigating "harm caused to civilians" from an airstrike it carried out in Gaza that Palestinian medics said killed eight members of one family including five children.

It was the single deadliest incident in two days of hostilities between Israel and the Palestinian militant group Islamic Jihad in the Gaza Strip this week during which 34 Palestinians were killed, almost half of them civilians, according to Palestinian officials.

Islamic Jihad and Israel declared a halt to fighting across Gaza on Thursday but a lasting cease-fire appeared tenuous as they differed on terms.

Palestinian militants fired two rockets deep into southern Israel from Gaza on Saturday, and the Israeli military responded with a number of air strikes on militant targets

The worst fighting in months was triggered on Tuesday when Israel killed a top commander from the Iranian-backed Islamic Jihad, deeming him an imminent threat. Militants responded with a barrage of hundreds of rockets into Israel, forcing entire communities to take shelter. Dozens of Israelis were injured but there were no reports of fatalities.

Throughout the fighting, Hamas, the dominant force in Gaza, appeared to have stayed on the sidelines. That may have helped stem the escalation.

Israel's military, however, said on Saturday that it would hold Hamas responsible for any attack emanating from Gaza.

"Hamas will bear the consequences for actions against Israeli civilians," it said in a statement.

On Thursday, in the final hours before the Egyptian-mediated truce took hold, residents and medical workers said an Israeli missile struck and destroyed a house in Dir al-Balah, killing eight of the family members inside.

An Israeli military spokeswoman said on Friday that Israeli forces had hit what she described as an "Islamic Jihad military infrastructure" in the central Gaza town on Thursday morning.

"According to the information available to the IDF [Israel Defense Forces] at the time of the strike, no civilians were expected to be harmed as a result of the strike," she said.

She added: "The IDF is investigating the harm caused to civilians by the strike."

Israeli Prime Minister Benjamin Netanyahu said earlier in the week that Israel, having killed the Islamic Jihad commander, was not interested in a broader conflict but would respond to every attack "with a very sharp attack and response".