Israel and Gaza may have agreed to a cease-fire early Monday, but experts expressed pessimism that the pause in violence would hold for more than a few weeks.

The weekend saw one of the most intense and deadly rounds of fighting between Israeli forces and militants in Gaza since the last war in 2014. It resulted in the deaths of 23 people in Gaza, both militants and civilians, and four civilians in Israel.

Friends and relatives mourn during the funeral of Moshe Agadi on Sunday. Agadi is an Israeli man who was killed after a rocket fired from Gaza hit his house in the southerm city of Ashkelon. Gil Cohen-Magen / AFP - Getty Images

Nearly 700 rockets were fired from Gaza toward Israel, while the Israeli military targeted 350 sites in the narrow strip of land, the military said late Sunday.

Early Monday, Gaza's ruling Hamas militant group reported that a truce had been reached and the Israeli military lifted protective restrictions in south of the country. The exact terms of the latest deal are not yet known.

But experts say the clash might provide political boosts to both Israeli Prime Benjamin Netanyahu and Hamas, which is considered a terrorist organization by the U.S. and European Union.

Neither side has an appetite for an all-out war but are using the incremental violence to achieve their own specific goals, according to Muhsen Abu Ramadan, a writer and political analyst in Gaza City.

“Hamas doesn’t want a war. They want to use military tools to show that they have power and as a tactic for lifting the siege,” said Abu Ramadan, referring to the land, sea and air blockade that Israel imposed on the Gaza Strip after Hamas took power.

A funeral for five Palestinians who were killed by Israeli strikes was held in Beit Lahia in the Gaza Strip on Sunday. Mahmud Hams / AFP - Getty Images

On the Israeli side, Netanyahu is using the violence to bolster his credentials as a strong leader as he forms a new governing coalition after last month’s election, Abu Ramadan said.

Israel and Hamas have fought several major conflicts in the last 12 years. However, short-lived bursts of violence have become more frequent and there is a growing feeling that a larger conflict is inevitable.

“I think we will reach a point that it will be difficult for the Israeli government to continue like this and it will feel obliged to respond more violently,” said Celine Touboul, deputy director general of the Tel Aviv-based Economic Cooperation Foundation think tank. "If money doesn’t enter Gaza or restrictions on the border remain, I don’t see any reason why we won’t see another wave of escalation."

Over the weekend, air raid sirens in southern Israel repeatedly sent residents running for cover.

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 border.

An explosion during an Israeli airstrike on Gaza City on Saturday. MAHMUD HAMS / AFP - Getty Images

Daily life for most of the strip's 2 million residents has become increasingly difficult. Almost none of the water is clean and access to electricity is patchy. Unemployment in the labor force is over 50 percent, with the level even higher among those aged under 30.

For both sides however, the current timing is poor for a longer and wider ranging confrontation.

This week, Israel will mark Memorial Day, one of the most solemn days of the year, followed immediately by the Independence Day holiday. Next week, Israel will to host the popular Eurovision song contest. For many Palestinians, this week marked the start of the Muslim holy month of Ramadan.

According to Amos Yadlin, a former chief of Israeli military intelligence, Israel’s current strategy has shown the Palestinians in Gaza that using violence to achieve concessions works.

The remains of a building in Gaza City that was hit during Israeli airstrikes on Sunday. MAHMUD HAMS / AFP - Getty Images

“The fact that Israel is cautious in its reaction has given Hamas more appetite to provoke Israel again and again," said Yadlin, who is now the director general of the Institute for National Security Studies think tank. "They attack without paying a high price.”

He advocated a three-pronged strategy including proactive political engagement with the ruling Palestinian Authority in the West Bank, humanitarian aid for the people of Gaza and a tough approach to the military wing of Hamas.