Prime Minister Benjamin Netanyahu says Israel will push on with fighting in Gaza until "absolute victory" despite suffering one of its toughest days of the military offensive.
"Yesterday we experienced one of the most difficult days since the war erupted," Netanyahu said on Tuesday.
"In the name of our heroes, for the sake of our lives, we will not stop fighting until absolute victory."
He said the military was "investigating the tragedy" in which 21 soldiers were killed when buildings exploded in central Gaza, bringing the single-day Israeli death toll to 24.
It was the biggest death toll in a single day since the war began, amid what Palestinians say was the most intense bombardment of southern Gaza in the conflict.
Israeli military spokesman Rear Admiral Daniel Hagari told reporters on Tuesday 21 soldiers were killed in an explosion.
He said militants had fired rocket-propelled grenades at a tank, and at the same time an explosion occurred in two buildings where forces had planted explosives.
The buildings collapsed onto the troops.
"We are still studying and investigating the details of the event and the reasons for the explosion," he said.
Earlier, the military had said three soldiers were killed in a separate attack in southern Gaza.
The assault came as Israeli forces pushed deep into western Khan Younis in Gaza, with an air, sea and land bombardment that included storming a hospital and arresting medical staff, Gaza health ministry spokesman Ashraf al Qidra told Reuters.
There was no word from Israel on the situation at the hospital, and the military spokesperson's office had no comment.
Qidra said at least 50 people were killed on Sunday night in Khan Younis, while the sieges at medical facilities meant dozens of dead and wounded were beyond the reach of rescuers.
The United States called on Israel to protect innocent Palestinians and medical staff.
White House National Security Council spokesman John Kirby said on Monday that Israel had a right to defend itself, but added: "We expect them to do so in accordance with international law and to protect innocent people in hospitals, medical staff and patients as well, as much as possible."
Israel says Hamas fighters operate in and around hospitals, which Hamas and medical staff deny.
Israel has launched an offensive to capture Khan Younis, which it now says is the principal headquarters of the Hamas militants responsible for the October 7 attacks on southern Israel that according to Israeli tallies killed 1200 people.
Israel has vowed to wipe out Hamas, the Palestinian Islamist movement that rules Gaza and is sworn to Israel's destruction.
At least 25,295 Gazans have been killed since October 7, Gaza health authorities said in an update on Monday.
International concern has mounted over the Palestinian death toll from Israel's assault on the densely populated enclave and a humanitarian crisis afflicting hundreds of thousands of people.
The US has urged Israel to reduce civilian harm in Gaza, called on it to stop violence by Israeli settlers against Palestinians in the occupied West Bank, and has said it still believes a two-state solution to the Israeli-Palestinian conflict is possible.
In Brussels on Monday, Israeli Foreign Minister Israel Katz sidestepped discussion of a two-state solution at a meeting with European Union counterparts, opting to show them aspirational videos of future infrastructure projects.
Israel has pushed back against calls for a Palestinian state, with Prime Minister Benjamin Netanyahu saying that any Palestinian state would pose "an existential danger" to Israel.
EU foreign policy chief Josep Borrell has circulated a discussion paper with a road map to peace that calls for a preparatory peace conference organised by the EU and Arab nations.
The US and the United Nations were invited to be conveners.
Washington on Monday called for an investigation and accountability "as appropriate" following the West Bank death on Friday of a 17-year-old Palestinian American, who Palestinian health officials say was killed by Israeli security forces.
The Israel-occupied West Bank has seen a surge of violence in parallel to the Gaza war that erupted in October.