GAZA/JERUSALEM (Reuters) - A ceasefire to end a surge of deadly violence in the Gaza Strip and southern Israel took hold on Monday after hundreds of Palestinian rocket attacks and Israeli air strikes.

The latest round of hostilities erupted three days ago, peaking on Sunday when rockets and missiles from Hamas Islamist-run Gaza killed four civilians in Israel, local health officials said. Israeli strikes killed 21 Palestinians, over half of them civilians, at the weekend, Gaza health authorities said.

Israel does not acknowledge ceasefire deals with Gaza militant groups, which it considers terrorist organizations. But officials in Prime Minister Benjamin Netanyahu’s government spoke of a reciprocal return to quiet.

One of the Israeli officials suggested that Israel’s arch-enemy Iran - a major financier of the Islamic Jihad movement - had been behind the Gaza escalation.

Suffering under renewed U.S. sanctions and Israeli strikes against its military assets in Syria, Iran may have seen stoking Palestinian violence as a way of telling Israel, “we will get back at you through (Islamic) Jihad and Gaza”, Israeli Energy Minister Yuval Steinitz told the Israeli radio station 90 FM.

Israel’s military said that more than 600 rockets and other projectiles - over 150 of them intercepted - had been fired at southern Israeli cities and villages since Friday. It said it shelled or carried out air strikes on some 320 militant sites.

The violence abated before dawn, after Palestinian officials said Egypt, Qatar and the United Nations had mediated a truce, and just as Gazans were preparing to begin the Muslim holy month of Ramadan.

“Over the last two days we struck Hamas and Islamic Jihad with great force. We hit over 350 targets. We struck at terrorist leaders and operatives and we destroyed terrorist buildings,” Netanyahu said in statement.

“The campaign is not over and it demands patience and good judgment. We are preparing to continue. The goal has been, and remains, ensuring quiet and security for the residents of the south.”

There was little enthusiasm for the ceasefire in Israeli rocket-hit communities near Gaza. Some residents said Israel agreed to the truce because it did not want rocket fire to spoil the Independence Day holiday this week or Eurovision Song Contest finals the begin in Tel Aviv on May 14.

“In a month, in two weeks, in a month and a half, it will all happen again - we achieved nothing. I think Israel needs to strike them very, very hard so that they learn their lesson,” said Haim Cohen, 69, a retired electrician from the city of Ashdod.

In Gaza, Palestinians attended funerals and extricated bodies from collapsed buildings.

“This is a very tough Ramadan. We will not feel festive,” said Sumayya Usruf, whose cousin, husband and four-month-old child were killed in an apartment in northern Gaza.

Slideshow ( 27 images )

LEVERAGE

The violence began when a sniper from Islamic Jihad fired across Gaza’s fenced border at Israeli troops on routine patrol, wounding two soldiers, according to the Israeli military.

Islamic Jihad accused Israel of delaying implementation of previous understandings brokered by Egypt in an effort to end violence and ease the economic hardships of blockaded Gaza.

Slideshow ( 27 images )

The measures included extending Gaza’s fishing zone, allowing international and Arab investment and job creation projects, improving electricity supply and broadening the amount and variety of goods moved into the enclave through Israel.

An official in one Gaza militant group, who spoke on condition of anonymity, said it had agreed to a truce on condition that those understandings would go into effect.

There was no official word from Israel on any bargaining behind the ceasefire. Netanyahu’s political opponents have accused him of effectively paying “protection” in recent months to Hamas, by agreeing to allow into Gaza cash aid from Qatar, to keep the border quiet.

Some 2 million Palestinians live in Gaza, the economy of which has suffered years of Israeli and Egyptian blockades as well as recent foreign aid cuts and sanctions by the Palestinian Authority, Hamas’ West Bank-based rival.

Israel says its blockade is necessary to stop arms reaching Hamas, with which it has fought three wars since the group seized control of Gaza in 2007, two years after Israel withdrew its settlers and troops from the small coastal enclave.

One of Islamic Jihad’s leaders in Gaza said on Sunday that the group was trying to counter efforts by the United States to revive peace negotiations between Israel and the Palestinians.

U.S. President Donald Trump’s Middle East team has said it will unveil its peace plan in June, after Ramadan is over. Peace negotiations have been moribund since 2014.

Israeli military spokesman Lieutenant-Colonel Jonathan Conricus said that over the past few weeks Islamic Jihad had been trying to perpetrate attacks against Israel in order to destabilize the border.

“This isn’t some local initiative, it is part of a strategic choice to escalate matters,” Conricus said.

Israel regards Islamic Jihad’s ally, Iran, as its biggest threat, and Tehran’s military has built a presence in Syria, backing President Bashar al-Assad, during an eight-year civil war there.

Israel has vowed to stop Iran entrenching in Syria, repeatedly bombing Iranian targets in the country and those of allied Lebanese Hezbollah militia.

Trump’s national security adviser John Bolton said on Sunday the administration was deploying a carrier strike group and bombers to the Middle East in response to troubling “indications and warnings” from Iran and to show the United States will retaliate with “unrelenting force” to any attack.