Israel's Defense Minister resigned in protest Wednesday after accusing the country’s leaders of “surrendering to terrorism” by agreeing to a cease-fire with militants in the Gaza Strip.

Avigdor Lieberman announced he was stepping down during a press conference less than 24 hours after Israel and terror group Hamas agreed to the pact. At least eight people were killed this week, as Israel and Hamas traded blows in some of the most intense fighting in the region since a 50-day war in 2014.

“What happened yesterday with the ceasefire with Hamas was a capitulation to terror. There is no other word for it,” Lieberman said, according to the Times of Israel. “We are buying short-term calm for long-term harm to security.”

Hamas hailed Lieberman’s resignation, calling it a “victory for Gaza,” the newspaper added.

The terrorist group’s spokesperson, Sami Abu Zuhri, was also quoted as saying Lieberman's departure showed Israel’s “recognition of its defeat at the hands of the Palestinian resistance.”

Lieberman had demanded a stronger Israeli response to the deluge of Hamas-fired rockets bombarding the Jewish state in recent days, according to the Associated Press. He said Wednesday he also fiercely objected to Israel's decision to let Qatar deliver $15 million to Gaza last week.

Palestinian militants have fired 460 rockets and mortars into Israel this week, while the Israeli military carried out airstrikes on 160 Gaza targets, according to the AP. Seven Palestinians, including at least five militants, were killed. In Israel, the hundreds of rocket strikes resulted in only one death so far.

Israeli Prime Minister Benjamin Netanyahu said Wednesday that Gaza's militant rulers had "begged for a cease-fire and they know why."

But the Egyptian-brokered cease-fire deal appeared to falter for at least a moment Wednesday. The Israeli military said it shot at and captured a Palestinian, seen with a knife and wire cutters, who approached the Gaza perimeter fence and hurled grenades into Israel. The grenades failed to explode.

Lieberman's resignation will go into effect in 48 hours. Netanyahu will take over the defense role on an interim basis.

The Associated Press contributed to this report.