TEL AVIV, Israel — Israeli Defense Minister Avigdor Lieberman resigned Wednesday in protest over a ceasefire agreed with Gaza militants, calling the truce a "surrender to terrorism."

"We are buying short-term peace at the price of long-term national security," he said in a press conference announcing his decision, which could weaken Prime Minister Benjamin Netanyahu's conservative coalition government and increases the chances of early elections.

Lieberman has called for a stronger response to Palestinian militants' most intense round of rocket fire against Israel since the 2014 Gaza war, according to The Associated Press. The two days of deadly violence raised fears of an all-out war.

"What happened yesterday, the ceasefire, combined with the entire process of arrangement with Hamas, is a surrender to terrorism," he said, referring to the Palestinian militants that control the blockaded and desperately poor Gaza Strip and are considered terrorists by Israel and the U.S.

Lieberman added that he also fiercely objected to Israel's allowing Qatar to deliver $15 million in aid to Gaza last week.

The resignation withdraws Lieberman's far-right Israel Beitenu party from Netanyahu's coalition, leaving the prime minister with control of just 61 of the 120 seats in parliament a year out from Israel's next election.

Lieberman was born in the former Soviet Union and is popular among fellow Russian-speaking immigrants as well as Israeli Jews suspicious of the country's Arab minority or who oppose the religious authority and power of ultra-Orthodox rabbis.

The leader of Hamas, Sami Abu Zuhri, described the resignation news as a "political victory for Gaza."

“The resignation of Lieberman is a recognition of defeat and helplessness in the face of the Palestinian resistance," he said in a statement.

Avigdor Lieberman in Jerusalem on Wednesday. Ammar Awad / Reuters

Netanyahu, who will take over Lieberman's position on an interim basis, said Hamas had "begged for a ceasefire." The Israeli leader has come under intense political pressure for not delivering a more decisive blow against Hamas.

Speaking at a memorial service for Israel's first leader, David Ben-Gurion, Netanyahu responded to criticism saying "leadership is not doing the easy thing; it is doing the right thing."

The latest round of fighting appears to have been triggered by a botched Israeli raid into Gaza Sunday that ignited clashes and left seven Palestinian militants and a senior Israeli officer dead.

Militants then fired some 460 rockets and mortars into Israel in a 24-hour period, after carrying out a missile attack on an Israeli bus that wounded a soldier on Monday. The Israeli military said its airstrikes hit 160 targets in Gaza, among them Hamas government buildings and its television station.

Seven Palestinians, including five militants, were killed. In Israel, a man was killed in a rocket strike and three other people were critically wounded.

The violence follows months of heightened tensions. Since March, thousands of Palestinians have held sometimes violence protests on the fence that separates Israel from Gaza, demanding an end to the blockade and the right to enter Israel to reclaim homes their families left after the country was founded in 1948.

Some 220 have been shot dead and around 24,000 wounded, according to Gazan health officials. Israel maintains many of those hurt and killed on the fence are in fact militants masquerading as peaceful demonstrators.

At the same time, thousands of acres of Israeli nature reserves and farm lands have been burned in fires caused by hundreds of incendiary kites and explosive balloons sent from Gaza. On Wednesday, Israel's military that it had shot at and captured a Palestinian who approached the Gaza perimeter fence and hurled grenades into Israel.

The incident marked the first unrest since Hamas and other militant groups in Gaza accepted the Egyptian-brokered ceasefire.

The military said it spotted the assailant with a knife and wire cutters. The grenades failed to explode.

Lawahez Jabari reported from Tel Aviv; Saphora Smith from London.