Avigdor Lieberman has abruptly resigned as Israel's defence minister in protest over a ceasefire reached with Gaza militants, rocking the Israeli political scene and potentially bringing about early elections.

Lieberman termed the ceasefire ending two days of intense fighting "surrender to terrorism," and said he could no longer serve a government that endorsed it. Lieberman had demanded a far stronger Israeli response to the most intense round of rocket fire against Israel since a 50-day war in 2014, but he appeared to have been overruled by Prime Minister Benjamin Netanyahu.

His resignation delivers a major blow to Netanyahu's coalition government and sparked immediate calls for early elections. Lieberman said he hoped that in the coming days a date would be set for a new vote. The opposition parties joined his call.

The government could technically survive without Lieberman's Yisrael Beiteinu faction. But with elections currently set for November 2019, it's unlikely to last that long in lame-duck form.

Lieberman's resignation will take effect in 48 hours and Netanyahu will take over on an interim basis.

Residents of southern Israel had greeted news of the ceasefire with anger as dozens of protesters in the rocket-battered town of Sderot chanted "Disgrace!" at what they saw as the government's capitulation to violence and its inability to provide them with safety.

Recent months have seen sporadic rocket attacks as well as militant infiltration attempts and a wave of incendiary kites that have destroyed Israeli crops.

PM defends decision

Netanyahu presented the decision to step back from a full-blown conflict as a unified one made by his security cabinet and based on the military's recommendations. But Lieberman and Education Minister Naftali Bennett, another hard-line member of the security cabinet, later expressed reservations, saying they favoured a stronger response.

Netanyahu defended his actions at a memorial ceremony for Israel's first prime minister, David Ben-Gurion.

"I see the big picture of Israeli security that I cannot share with the public," he said. "Our enemies begged for a ceasefire and they know well why. I cannot detail our plans for the future. We will dictate the time and circumstances that are right for Israel and are right for the security of our people.

Israeli Prime Minister Benjamin Netanyahu, shown at the state memorial ceremony for Israel's first prime minister in Sde Boker on Wednesday, defended his decision to step back from a full-blown conflict as a unified one made by his security cabinet and based on the military's recommendations. (Ronen Zvulun/Reuters)

"In times like these, leadership is not doing the easy thing. Leadership is doing the right thing, even if it is hard. Leadership is sometime facing criticism," he added.

Hamas said Lieberman's resignation marked a "political victory for Gaza."

"Lieberman's departure is recognition of defeat and failure to confront the Palestinian resistance," Hamas spokesperson Sami Abu Zuhri said in a statement. "Gaza's steadfastness sent a political shockwave."

The Israel-Gaza frontier remained quiet overnight after heavy fighting in recent days. But on Wednesday afternoon, Gaza's fishermen's union said a 20-year-old fisherman was fatally shot on the beach near the fence separating Gaza from Israel.

Palestinian militants had fired 460 rockets and mortars into Israel in a 24-hour period, while the Israeli military carried out airstrikes on 160 Gaza targets. Seven Palestinians, including five militants, were killed. In Israel, one person was killed in a rocket strike and three were critically wounded.

Palestinians survey the rubble from a destroyed residential building hit by Israeli airstrikes in Gaza City on Tuesday. (Khalil Hamra/Associated Press)

The two sides had appeared to be on the verge of their fourth war in a decade. Instead, Gaza's Hamas rulers abruptly announced a ceasefire and Israel's Security Cabinet ended a seven-hour discussion with an apparent decision to hold its fire.

The news was greeted with celebrations in Gaza, with Hamas declaring victory in the latest round of violence, which was triggered by a botched Israeli raid on Sunday that left seven Palestinian militants and a senior Israeli military officer dead.

Recurring border protests

Hamas has staged near-weekly border protests since March in an effort to lift the Israeli-Egyptian blockade imposed after the Islamic militant group seized control of the coastal strip in 2007. The blockade has ravaged Gaza's economy, and Israel refuses to lift it unless Hamas disarms, a demand rejected by the militant group, which is pledged to Israel's destruction.

Demonstrators each week have approach the border fence, throwing firebombs, grenades and burning tires at Israeli troops. The Associated Press says Israeli snipers have killed about 170 people, most of them unarmed. Reuters says Israeli troops have killed around 220 Palestinians.

Israel says it is defending its border against attackers, but it has come under heavy international criticism for shooting unarmed people.

Before Sunday's raid, Egyptian and UN mediators had made progress in reducing tensions. In recent days, Israel had allowed fuel shipments to increase the power supply in Gaza, which suffers from frequent blackouts, and agreed to additional Qatari assistance to allow Hamas to pay the salaries of its thousands of government workers.

The standoff has produced repeated rounds of violence in recent years, including indiscriminate Gaza rocket fire at Israeli towns and cities and punishing Israeli military offensives, but Hamas remains firmly in control.

"We are third-class citizens here in Sderot and the communities on the border with Gaza," complained David Maimon, a local resident. "It's a shame. Instead of helping us and letting us live quietly, they let us suffer."

Residents of southern Israel protest their government's decision to hold fire in Gaza in response to a similar decision by Palestinian militants, in Sderot, Israel, on Tuesday. (Amir Cohen/Reuters)

In recent days, Israel had allowed fuel shipments to increase the power supply in Gaza, which suffers from frequent blackouts, and agreed to additional Qatari assistance to allow Hamas to pay the salaries of its thousands of government workers.

The current round of violence began when an Israeli commando unit on an undercover mission in Gaza was discovered by Hamas militants, setting off a deadly battle late Sunday. Hamas and other militant groups responded with a wave of rocket attacks the following day.

The Israeli military said its jets struck several "key strategic" Hamas targets in response, including military compounds, rocket launching posts and part of its vast underground tunnel network. Also targeted were Hamas's TV station and a Gaza City building serving Hamas's military and intelligence forces that houses a munitions warehouse.