GAZA CITY, Gaza Strip -- Gaza's Hamas rulers said Wednesday they had agreed to a cease-fire with Israel to end the largest flare-up of violence between the sides since a 2014 war. Khalil al-Hayya, a senior Hamas official, said Egyptian mediators intervened "after the resistance succeeded in warding off the aggression." He said militant groups in Gaza will commit to the cease-fire as long as Israel does.

Israeli Cabinet minister Arieh Deri told Israel's Army Radio that he expected calm to be restored.

"If it will be quiet, we will respond with quiet. We've given Hamas a chance to prove that we can return to routine ... If they release the reins there will be a very painful strike," he said. "There is a good chance that the routine will be restored after the blow the army unleashed on them."

The Israeli military struck dozens of militant sites in Gaza overnight as rocket fire continued toward southern Israeli communities into early Wednesday morning, setting off air raid sirens in the area throughout the night.

Get Breaking News Delivered to Your Inbox

The military said it hit drone storage facilities, military compounds, and rocket and munition workshops across the Gaza Strip. The overnight Hamas rocket fire reached the city of Netivot for the first time since the 2014 war. A home was struck, but no one was wounded.

With neither side interested in a full-blown conflict, a tense calm appeared to be holding Wednesday as Israeli children went to school in the morning.

The border area has been tense in recent weeks as Palestinians have held mass protests aimed at lifting an Israeli-Egyptian blockade imposed after Hamas seized power in 2007.

Israeli fire has killed more than 110 Palestinians, most of them during the Hamas-led protests, which climaxed on May 14.

Israel and Hamas are bitter enemies and have fought three wars since the Islamic militant group seized control of Gaza in 2007.

The last war, in 2014, was especially devastating, with over 2,000 Palestinians killed, including hundreds of civilians, and widespread damage inflicted on Gaza's infrastructure in 50 days of fighting. Seventy-two people were killed on the Israeli side.

A crippling Israeli-Egyptian blockade, imposed when Hamas took power, has meanwhile brought the local economy to a standstill.

Hamas initially billed the weekly border protests as a call to break through the fence and return to homes that were lost 70 years ago during the war surrounding Israel's establishment. But the protests appear to be fueled primarily by a desire to ease the blockade. Gaza's unemployment rate is edging toward 50 percent, and the territory suffers from chronic power outages.

After Gaza militants fired some 30 mortars shells early Tuesday, Israel responded fiercely, threatening to set off another round of confrontations.

The Israeli military said most of the projectiles fired Tuesday were intercepted, but three soldiers were wounded. One mortar shell landed in a kindergarten shortly before it opened, wounding one person.

Brig. Gen. Ronen Manelis, the chief military spokesman, threatened tougher action and said it was up to Hamas to prevent the situation from escalating.