JERUSALEM — The Israeli military pulverized the Gaza Strip with airstrikes, prepared for a possible ground invasion and said Thursday its complete siege of the territory — which has left Palestinians desperate for food, fuel and medicine — would remain in place until Hamas militants free some 150 hostages taken during a grisly weekend incursion.

A visit by Secretary of State Antony Blinken, along with shipments of U.S. weapons, offered a powerful green light to Israel to drive ahead with its retaliation in Gaza after Hamas’ deadly attack on civilians and soldiers, even as international aid groups warned of a worsening humanitarian crisis. Israel has halted deliveries of basic necessities and electricity to Gaza’s 2.3 million people and prevented entry of supplies from Egypt.

“Not a single electricity switch will be flipped on, not a single faucet will be turned on and not a single fuel truck will enter until the Israeli hostages are returned home,” Israeli Energy Minister Israel Katz said on social media.

Lt. Col. Richard Hecht, an Israeli military spokesman, told reporters Thursday that forces “are preparing for a ground maneuver” should political leaders order one. A ground offensive in Gaza, which is ruled by Hamas militants and where the population is densely packed into a sliver of land only 25 miles long, would likely bring even higher casualties on both sides in house-to-house fighting.

Hamas’ assault on Saturday killed more than 1,300 people in Israel, including 247 soldiers — a toll unseen in Israel for decades — and the ensuing Israeli bombardment has killed more than 1,530 people in Gaza, according to authorities on both sides. Israel says roughly 1,500 Hamas militants were killed inside Israel, and that hundreds of the dead in Gaza are Hamas members. Thousands have been wounded on both sides.

As Israel pounds Gaza from the air, Hamas militants have fired thousands of rockets into Israel. Amid concerns that the fighting could spread in the region, Syrian state media reported that Israeli airstrikes on Thursday put two Syrian international airports out of service.

The relentless barrage on Gaza — 6,000 munitions dropped since the conflict began, the military said — left Palestinians running through streets with what belongings they could carry, looking for safety.

A strike Thursday afternoon in the Jabaliya refugee camp collapsed a residential building on families sheltering inside, killing at least 45 people, Gaza’s Interior Ministry said. At least 23 of the dead were under the age of 18, including a month-old child, according to a list of the casualties.

Ministry spokesman Eyad Bozum said dozens were wounded, and the death toll was likely to rise as rescue workers pulled more bodies from the rubble.

The home belonging to the al-Shihab family was packed with relatives who had fled bombing in other areas. Neighbors said a second house was hit at the same time, but the toll was not immediately known.

“We can’t flee because anywhere you go, you are bombed,” one neighbor, Khalil Abu Yahia, said. “You need a miracle to survive here.”

By Wednesday night, the number of people who fled their homes reached 340,000 people — roughly 15% of Gaza’s population. Most crowded into U.N.-run schools while others stayed with relatives or even strangers.

Families were cutting down to one meal a day, said Rami Swailem, a 34-year-old lecturer at al-Azhar University, who has 32 relatives sheltering in his home. Water stopped coming to the building two days ago, and they were rationing what’s left in the tank on the roof.

Hospitals, overwhelmed by a constant stream of wounded and running out of supplies, have only a few days worth of fuel before their power cuts off, aid officials say.

“Without electricity, hospitals risk turning into morgues,” said Fabrizio Carboni, regional director of the International Committee of the Red Cross. Newborn incubators, kidney dialysis machines, X-ray equipment and more, are all dependent on power, he said.

Ambulance crews carrying bodies to the morgue at Gaza’s biggest hospital, Shifa, found no space left. Dozens of full body bags were lined up in the hospital parking lot. Fourteen health facilities have been damaged in strikes, health officials said Thursday.

With Israel sealing off the territory, the only way in or out is through the crossing with Egypt at Rafah, but Egypt’s Foreign Ministry said Thursday that airstrikes on Rafah have prevented it from operating. Egypt has been trying to convince Israel and the United States to allow aid and fuel through the crossing.

Israel is employing a new tactic of leveling whole neighborhoods, rather than just individual buildings. Hecht, the military spokesman, said targeting decisions were based on intelligence on locations being used by Hamas and that civilians were warned.

“Right now, we are focused on taking out their senior leadership,” Hecht said. The military said strikes have hit Hamas’ elite Nukhba forces, including command centers used by the fighters in Saturday’s attack, and the home of a senior Hamas naval operative used to store weapons.

The Palestinian Health Ministry said more than two dozen Palestinians have been killed in the West Bank and two in Israeli-annexed east Jerusalem since Saturday, most when police fired on stone-throwing protesters.