JERUSALEM (AP) — The Israeli military lifted protective restrictions on residents in the south on Monday, while Gaza's ruling Hamas militant group reported a cease-fire deal had been reached to end the deadliest fighting between the two sides since a 2014 war.

The escalation had killed 25 on the Gaza side, both militants and civilians, while on the Israeli side four civilians were killed by incoming fire.

The Islamic Jihad militant group, which Israel accused of instigating the latest violence, confirmed that a "mutual and concurrent" truce had been brokered by Egypt. Hamas spokesman Hazem Qassem said Egyptian mediators, along with officials from Qatar and the U.N., helped reach the deal. He said Hamas could still use "different pressuring tools" to get Israel to ease a crippling blockade of Gaza.

Israeli Prime Minister Benjamin Netanyahu pointedly noted that "the campaign is not over, and it requires patience and judgment."

The intense fighting over the past two days came to a halt early Monday and residents on both sides went back to their daily routines. Schools and roads had been closed, and Israelis had been urged to remain indoors and near bomb shelters as intense rocket fire pounded the area.

Israel and Hamas are bitter enemies and have fought three wars and numerous smaller battles since the Islamic militant group seized Gaza from Western-backed Palestinian forces in 2007.

In the latest fighting, which erupted over the weekend, Palestinian militants fired hundreds of rockets into Israel, while the Israeli military responded with airstrikes on some 350 militant targets inside Gaza, including weapons storage, attack tunnels and rocket launching and production facilities.

It also deployed tanks and infantry forces to the Gaza frontier, and put another brigade on standby. A Hamas commander allegedly involved in transferring Iranian funds to the group was killed in an airstrike, in an apparent return to Israel's policy of targeting militant leaders.

Story continues

Palestinian medical officials reported 25 deaths, including at least 10 militants as well as three women, two of them pregnant, and two babies. The four Israeli civilians killed were the first Israeli fatalities from rocket attacks since the 50-day war in 2014. One was killed when his vehicle was hit by a Kornet anti-tank missile near the Gaza border.

The Israeli military had no immediate comment on an airstrike that killed six civilians, including a 12-year-old boy and an infant, when it destroyed a five-story apartment block in the northern Gaza Strip town of Beit Lahiya. The Gaza public works ministry said 130 housing units were destroyed by Israeli airstrikes.

Egyptian mediators had been working with the U.N. to broker a cease-fire. Under past Egyptian-brokered deals, Israel has agreed to ease its joint blockade of Gaza with Egypt in exchange for a halt to rocket fire.

The latest fighting broke out after Palestinian militants accused Israel of not honoring an earlier cease-fire deal from March and opened fire on soldiers on the Israeli side of the Gaza frontier.

The terms of the latest deal were not known, but recent cease-fires have been short-lived.

In weary communities in southern Israel, there was criticism that the latest round of fighting had ended without tangible results — and no hope that it would not recur soon.

"When we have the upper hand, we need once and for all to finish the terror because this will repeat itself and will not stop," said Jacque Mendel, a resident of the coastal city of Ashdod, where a man was killed in his car by a rocket Sunday night.

Israel appears to have little appetite for another prolonged conflict. Later this week, the country marks Memorial Day, one of the most solemn days of the year, followed by the festive Independence Day. Next week, Israel is to host the popular Eurovision song contest, and the fighting could have deterred visitors.

Netanyahu, who recently secured re-election in part thanks to the votes of the rocket-battered residents along the Gaza Strip frontier, has traditionally been cautious in his handling of Gaza, for fear of sparking an open-ended war with no clear endgame. But he is under pressure from the same electorate and his potential coalition partners appear to favor a more hard-line approach to Gaza.

Even within his own ruling Likud Party, Netanyahu faced unusual criticism for not going further to quash Gaza militants.

Likud lawmaker Gideon Saar wrote on Twitter that the reported cease-fire was not an achievement for Israel. "The timeframes between these violent attacks on Israel and its citizens are getting shorter and the terror groups in Gaza are getting stronger between them," he wrote.

Benny Gantz, Israel's emerging opposition leader, also criticized Netanyahu, saying that ending the current round amounted to "another surrender to the extortion of Hamas and the terror organizations."

In Gaza, a year of Hamas-led protests along the Israeli frontier against the blockade that has ravaged the economy has yielded no tangible benefits. In March, Hamas faced several days of street protests over the dire conditions.

Still, Hamas leader Ismail Haniyeh said late Sunday that the militant group was "not interested in a new war," and the start on Monday of the Muslim holy month of Ramadan likely lessened motivation for battle.

Signs of normal life slowly returned to Gaza, with banks opening after three days. Schools are to reopen on Tuesday.

___

Akram reported from Gaza City, Gaza Strip.