Staff inside Gaza's largest hospital have said patients and refugees are trapped in horrific conditions as heavy fighting rages in nearby streets.
A surgeon at Al-Shifa in Gaza City told the BBC that the hospital had run out of water, food and electricity.
Israel said it had clashed with Hamas nearby but not fired on the hospital.
It said it would help to evacuate babies to "a safer hospital" on Sunday, after medics said two had died and 37 others were at risk.
The BBC has been sent pictures of at least 20 newborn babies being kept in a surgical theatre at Al-Shifa, as doctors warn they may die because the neonatal intensive care unit has stopped working, due to the lack of electricity.
Reports from inside the hospital paint a picture of horror and confusion, with regular fighting nearby, patients who have recently undergone operations unable to evacuate, and bodies piling up without any way to bury them.
Thousands of people are thought to have sought refuge in Al-Shifa, which has been at the centre of fierce fighting for two days.
The Israel Defense Forces (IDF) repeatedly accuse Hamas of operating from tunnels underneath the hospital, which Hamas denies.
Surgeon Marwan Abu Saada told the BBC that the sounds of shooting and bombardments echoed through Al-Shifa "every second".
He said attempts to bury the dead had been thwarted by fighting around the complex.
"We don't want to have any outbreaks due to these dead bodies," he said, adding that the morgue refrigerator was not working because the generator had run out of fuel.
Physicians for Human Rights Israel, a doctors group, said two premature babies had died because there was no electricity.
The group warned that there was "a real risk to the lives of 37 other premature infants".
Israel said there was no siege of Al-Shifa, and that the east side of the hospital was open for the safe passage of those who wanted to leave.
Spokesman Rear Admiral Daniel Hagari said Israel would help those "in the paediatric department to get to a safer hospital" on Sunday.
He said the decision was taken following a request from the hospital administration and Israel "will provide the assistance needed".
Earlier, Colonel Moshe Tetro said there were clashes near Al-Shifa between Hamas and Israeli forces, but no shooting at the hospital itself.
Pictures shared with the BBC show at least 20 infants in a surgical ward, wrapped in blankets and lined up in rows on adult hospital beds.
Many of them appear to have tape on their faces, suggesting the need for oxygen administration.
Doctors have warned for at least a fortnight that the number of available incubators was being reduced due to the power shortage amid the ongoing Israeli siege.
Dr Abu Saada said the babies needed intensive care, life support equipment and artificial respiration.
"I'm afraid if we leave these children in this unit in this condition we are allowing them to die… they are premature babies", he said, in a voice note passed on to the BBC.
International charities have warned that patients in hospitals close to fighting in Gaza are at risk of dying because of a lack of medical treatment.
Doctors Without Borders (MSF) deputy medical coordinator told the BBC that if there was no ceasefire, "all the patients who are remaining in these hospitals will just die, and these hospitals will turn into graveyards".
At the Al-Quds hospital, the Palestine Red Crescent Society (PRCS) said its teams were trapped inside alongside 500 patients and around 14,000 displaced people.
Meanwhile one of Gaza's smaller hospitals, Al-Rantisi, was largely evacuated - with only a handful of patients and staff inside.
The Gaza Strip is home to 2.2m people, but since the start of the war more than 1.5m people have been displaced, according to the UN's agency for Palestine refugees (UNRWA).
Hamas killed an estimated 1,200 people inside Israel on 7 October - many of them civilians - and took more than 200 others hostage.
Israel's response inside Gaza has killed more than 11,000 people, according to the Hamas-run health ministry. It says that figure includes more than 4,500 children.
In an interview with the BBC on Friday, French President Emmanuel Macron said Israel must stop killing Gaza's women and babies.
Mr Macron called for a ceasefire and hoped other leaders - including the US and the UK - would join him.
More on Israel-Gaza war
Follow live: Latest updates
From Israel: How much closer is Israel to its goal in Gaza?
Explained: The faces of hostages taken from Israel
History behind the story: The Israel-Palestinian conflict