Thousands of people appear to have fled from the Gaza Strip’s largest hospital as Israeli forces and Palestinian militants battle outside, but hundreds of patients remain inside, health officials said.

The patients including dozens of babies at risk of dying because of a lack of electricity, the officials added.

With only intermittent communications, it was difficult to reconcile competing claims from the Israeli military, which said it was providing a safe corridor for people to move south, and Palestinian health officials inside the hospital, who said the compound was surrounded by constant heavy gunfire.

Israel PalestiniansSatellite image of Shifa hospital and surroundings in Gaza City (Maxar Technologies/AP)

The military said it had placed 300 litres (79 gallons) of fuel near Shifa hospital to help power its generators, but that Hamas militants had prevented staff from reaching it.

The Health Ministry in Hamas-ruled Gaza disputed that, and said the fuel would have provided less than an hour of electricity.

World Health Organisation director-general Tedros Adhanom Ghebreyesus said Shifa has been without water for three days and “is not functioning as a hospital any more”.

The fighting was triggered by Hamas’s unprecedented October 7 surprise attack into Israel, and Israel’s response has brought unseen levels of death and destruction to Gaza’s 2.3 million Palestinian residents, nearly two-thirds of whom have had to flee their homes with no safe refuge available in the besieged territory.

At Shifa, doctors running low on supplies perform surgery on war-wounded patients, including children, without anaesthesia. Thousands of people displaced by air strikes that have destroyed entire city blocks have sought shelter in its darkened corridors.

Israel says the hospital is the prime example of Hamas’s alleged use of human shields, claiming — without evidence — that the militants have a command centre and other military infrastructure in and beneath the medical compound. Hamas and hospital staff deny those allegations.

Mohammed Zaqout, the director of hospitals in Gaza, says there are about 650 patients and critically wounded people in Shifa being treated by around 500 medical staff. He estimated that around 2,500 displaced Palestinians are sheltering inside hospital buildings.

On Saturday, the Health Ministry estimated that 3,000 medics and patients, as well as 15,000 to 20,000 displaced people, were sheltering there.

A UN health official said many displaced families and patients with moderate injuries fled Shifa as Israeli forces encircled the hospital over the weekend. The source said most of the remaining patients could only be relocated with ambulances and other special procedures.

Israel PalestiniansSmoke rises following an Israeli air strike in the Gaza Strip (Leo Correa/AP)

It is unclear where they would go, as several hospitals and clinics in Gaza have been forced to shut, while others are working at full capacity with dwindling supplies.

The Health Ministry says three babies and four other patients have died since the hospital’s emergency generator ran out of fuel on Saturday, and another 36 babies and other patients are at risk of dying because there is no way to power life-saving medical equipment.

The military said troops would assist in moving babies on Sunday, without saying how or where to. There was no indication on Monday that any had been moved.

Medical Aid for Palestinians, a UK-based charity which has supported Shifa’s neonatal intensive care unit, said transferring critically ill infants is complex.

“With ambulances unable to reach the hospital… and no hospital with capacity to receive them, there is no indication of how this can be done safely,” chief executive Melanie Ward said.

She said the only option was to pause the fighting and allow in fuel.

APTOPIX Israel PalestiniansPalestinians look for survivors following an Israeli air strike in Khan Younis (Fatima Shbair/AP)

Christos Christou, president of the Doctors Without Borders aid group, said it would take weeks to evacuate the patients.

The US and others have pushed for temporary pauses that would allow for wider distribution of aid to civilians in the territory, where conditions are increasingly dire.

But Israel has only agreed to brief daily periods during which civilians can flee ground combat in northern Gaza and head south on foot along two main roads.

Israel continues to strike what it says are militant targets across southern Gaza, often killing women and children.

More than 11,000 Palestinians, two-thirds of them women and children, have been killed since the war began, according to the Health Ministry in Gaza, which does not differentiate between civilian and militant deaths. About 2,700 people have been reported missing.

Health officials have not updated that toll since Friday because of the difficulty of accessing hard-hit areas and collecting information.

At least 1,200 people have been killed on the Israeli side, mostly civilians killed in the initial Hamas attack.

Palestinian militants are holding nearly 240 hostages seized in the raid, including men, women, children and older adults. The military says 48 soldiers have been killed in ground operations in Gaza.