Prime Minister Benjamin Netanyahu and his defense minister, Ehud Barak, on Thursday asserted that the government had attained the goals it set out to accomplish with Operation Pillar of Defense, but was determined to resume attacks on the Gaza Strip if a tentative ceasefire reached on Wednesday unraveled.

“The IDF dealt a very heavy blow to Hamas and the other terror organizations,” Netanyahu said during a visit to the Israel Police National Headquarters in Jerusalem. “We took out thousands of rockets that were aimed at the south, and almost all of the rockets that were pointed at the center of the country. We’re prepared to act if the quiet is broken.”

The prime minister acknowledged the frustration expressed by some Israelis who felt that the army should have pressed forward with a ground offensive and dealt Hamas a decisive, perhaps fatal blow.

“We’re prepared for [a more extensive operation] as well,” Netanyahu said. “We choose — as we did in this operation — when to act, against whom, and in what fashion. For the moment we’ve given the ceasefire a chance; it’s the right step for Israel, but if it isn’t upheld [by the other side], we’ll do what’s necessary.”

Barak said that Israel may be forced to fight Hamas again, possibly in the near future. But despite the tenuous nature of the ceasefire with the rulers of the Gaza Strip, he said, Israel had achieved its goals in Operation Pillar of Defense.

In an interview with Israel Radio — his first since Israel and Hamas agreed to ceasefire terms Wednesday, after eight days of fighting — Barak said that the military option of conquering the Gaza Strip was on the table throughout the operation. But removing Hamas from power, he said, would create a situation where “we’ll be forced to stay [in Gaza] for years.”

“You can topple the Hamas regime, but the problem is, you don’t know how to get out” of ruling Gaza, he said.

Insisting that the IDF came out on top in the latest round of hostilities — despite Hamas claims to the contrary — Barak said Hamas was dealt a serious blow.

“While our chief of staff will be addressing the press soon, their chief of staff is in the ground,” he said. Hamas’s military commander, Ahmed Jabari, was killed by an Israeli Air Force strike last Wednesday, the first day of the Gaza operation.

Hamas, he continued, “succeeded in hitting Israeli targets with only a single ton of explosives, while targets in Gaza were hit with a thousand tons… We have a powerful, effective military, and we consistently succeed in hitting Hamas hard.”

While some analysts have argued that the terms of the ceasefire with Hamas put Israel at a disadvantage, Barak said there was no difference between the ceasefire terms and the terms of previous agreements.

Senior Defense Ministry official Amos Gilad said the ceasefire agreement did not mark an Israeli capitulation or relinquishment of its rights to defend itself, including its right to launch targeted killings of Palestinian terror suspects. In an interview Thursday with Israel Radio, Gilad noted that the purpose of the agreement was to defend Israel’s citizens, and that new threats would be dealt with as they emerged.

Gilad said that, in Gaza, Israel had to act with full force, but also had to “know when to stop.” Re-occupying the territory, which Israel handed over to the Palestinians in 2005, was a military possibility, he said, but one that would have “serious repercussions” for Israel’s relations with its neighbors.

Chief of General Staff Lt. Gen. Benny Gantz also said that the army had achieved its objectives in Gaza.

“We hit the leaders of Hamas, the rockets, and the buried launchers,” he said in a meeting with soldiers in the south. “After eight days of fighting we stopped, and it’s too early to say what will be… We have all the authority to act as necessary. There will be challenges, and we will overcome them no matter what.”

Earlier, Labor Party leader Shelly Yachimovich praised the success of the Iron Dome system — which was initiated by her political rival, former defense minister Amir Peretz — for the protection it afforded civilians and for the operational freedom it gave the government in dealing with the threats from Gaza. A high death toll in Israel would have forced the government’s hand.

“We acted like a responsible opposition and supported the government in the conditions it laid down at the opening of the conflict,” Yachimovich told Israel Radio.

She said she hoped the ceasefire would hold. But given the prevailing conditions at the start of the operation, she said, she was unsure Pillar of Defense had yielded the desired results for Israel.

Opposition leader and former military chief of staff Shaul Mofaz of the Kadima party criticized the government for the agreement, which he said did not guarantee the safety of Israeli citizens and did not mark the defeat of Hamas.

The agreement was not a ceasefire but a “postponement of fire,” he said.

Stuart Winer contributed to this report.