Israel and Hamas agreed to restore calm in the Gaza Strip in the early hours of Saturday morning, according to a spokesman for the Palestinian group, easing fears that the two sides were hurtling towards their fourth all-out conflict in 10 years.

"With Egyptian and United Nations efforts it has been agreed to return to the era of calm between (Israel) and Palestinian factions," Fawzi Barhoum told Reuters.

Israeli officials did not immediately comment on the announcement but an army spokeswoman said that there was no known military activity in Gaza during the early hours of Saturday.

Hours earlier, intense fighting - the most serious in Gaza since the 2014 war - raised the specter of a new phase of bloodshed.

Palestinian gunmen killed an Israeli soldier on the Gaza border on Friday afternoon, prompting Israel to respond with a wave of airstrikes which killed at least three Hamas fighters.