Hamas has told Egypt it will enforce a ceasefire by militant factions in Gaza aimed at halting bloodshed which started with the killing of eight Israelis by gunmen last week.

The truce was finalised yesterday in Gaza after the Popular Resistance Committees, the faction blamed by Israel for last Thursday's lethal attack near the Red Sea resort of Eilat, finally agreed to what it called a "temporary" ceasefire.

Although Hamas was thought, along with Israel, to be anxious not to let the cycle of Israeli air strikes and Palestinian rocket attacks to spiral out of control, the agreement in Gaza appeared to be a success for Egyptian diplomacy, backed by the UN.

Around 15 rockets and mortars were fired by Gaza militants overnight, causing no injuries. Israel responded with an air strike which targeted a rocket launcher.

At least 15 Palestinians have been killed in the air strikes, mainly militants, but also including a doctor, and three children under the age of 14.

A 38-year old Israeli man was killed in a rocket attack on Beersheeva on Saturday night. The PRC claimed responsibility for the attack.

Israel has made clear that it has not made an agreement with the Palestinian factions but that it will respond in kind provided the rocket attacks stop. Israel's President Shimon Peres said while on a tour of the southern Israeli communities that are most affected by rocket attacks: "If they will cease fire, there will be a cease-fire."

However, an Israeli official warned that the military would reserve the right to attack those attempting to fire rockets, whether before or after the rockets had actually been fired, and to fire on those Palestinians who approach too close to the border fence with Israel.

The official declined to confirm that Israel had helped to pave the way for the factions' agreement to a ceasefire by making clear in advance to the Egyptians that it would respond positively if one was called. But an Israeli delegation was in Cairo on Sunday while its terms were being drawn up.

Israel has been anxious to maximise co-operation with the post-Mubarak authorities after a diplomatic row blew up at the weekend.

Egypt threatened to withdraw its ambassador from Tel Aviv over complaints that three of its security personnel had been killed by Israeli troops firing on gunmen as they retreated across the border after Thursday's attack along Route 12, which is 20km from Eilat.

In a rare statement issued during the Sabbath, Defence Minister Ehud Barak expressed Israel's "regret" for the deaths of the three security men and promised a joint investigation to be carried out by both the Israeli and Egyptian military authorities.

The air strikes on Gaza started within hours of Thursday's attack.

One of the strikes – believed to be by a drone – killed five prominent PRC members in the yard of a house in the southern town of Rafah. But the strike also killed the two-year-old son of one of the PRC members.

Meanwhile, the Israel Defence Force has not yet released any names of the seven gunmen that it says it hit. But it says that it killed at least four gunmen in the fierce exchanges of gunfire which followed on from Thursday's well-executed attack.

Israeli officials say they knew that the attack was the work of the PRC because of prior intelligence that the organisation planned an attack in the area – intelligence some Israeli critics have argued should have enabled security forces to prevent the attack. While the information was detailed this did not extend to the timing of the attack, an unexpectedly bold raid conducted in daylight.

Meanwhile a senior Israeli military officer, Colonel Zvika Haimovitch, acknowledged yesterday that the new "Iron Dome" rocket defence system did not offer full protection against all the salvos that had been fired from Gaza over the last few days.