Israeli President Isaac Herzog has denied that Israel is striking Gaza’s largest hospital.
Reports from staff at Al-Shifa suggest the facility, sheltering thousands of Palestinians, has run out of electricity.
But Mr Herzog said “everything is operating” at the hospital.
Speaking to the BBC’s Laura Kuenssberg he also said a copy of Adolf Hitler’s Mein Kampf was found on the body of a Hamas fighter in northern Gaza.
Mr Herzog said a copy translated into Arabic was found “just a few days ago” in a children’s room that had been “turned into a military operation base of Hamas”.
The Nazi leader’s antisemitic manifesto was first printed in 1925.
Finding a copy of it in northern Gaza, Mr Herzog said, showed that some in Hamas “learned again and again Adolf Hitler’s ideology of hating the Jews”.
Earlier, the World Health Organization (WHO) said it had lost communication with its contacts at Al-Shifa, with staff and patients trapped by fighting outside.
WHO chief Dr Tedros Ghebreyesus later said that contact has been restored but warned of “dire” conditions inside. He repeated calls for a ceasefire and said the hospital has been without electricity and water for three days.
Doctors and the Hamas-run health ministry in Gaza have said a lack of fuel there means patients cannot be operated on and incubators for premature babies cannot run. But the president disputed this.
“We deny this at all, there is a lot of spin by Hamas… but there’s electricity in Shifa, everything is operating,” Mr Herzog said.
Israel has said that Hamas has a base underneath the hospital building – a claim denied by Hamas.
Asked whether Israel has gone too far in its response to Hamas’s 7 October attack, Mr Herzog said: “We work exactly according to the rules of international humanitarian law. We alert each and every civilian, because their homes have become terror bases”.
He added: “Unfortunately, there are tragedies. We don’t shy away from them. But truly many of the tragedies are done by Hamas, like they bombed [Al-]Shifa hospital yesterday, not Israel.”
Surgeon Marwan Abu Saada told the BBC on Saturday that the hospital had run out of water, food and electricity.
He said the sounds of shooting and bombardments echoed through the hospital “every second”.
Israeli military spokesman Rear Admiral Daniel Hagari said Israel would help evacuate babies from Al-Shifa following a request from the hospital administration. A doctors group said on Saturday that two premature babies had already died.
Asked about growing calls for a ceasefire, including from France’s President Macron, Mr Herzog asserted Israel’s right to defend itself after the attacks of 7 October.
“We of course listen to our allies, but first and foremost, we defend ourselves,” he said.
He acknowledged that there had been civilian deaths in Gaza but blamed Hamas for many of the tragedies.
Mr Herzog said his country’s operations in Gaza were carried out “according to the rules of international humanitarian law”, with Israel alerting civilians with phone calls and text messages, and urging them to evacuate from northern Gaza and “go down [to southern Gaza]”.
“We give them humanitarian pauses so that they can go down [south],” Mr Herzog said.
More than 11,000 people have been killed in Gaza since the start of the war, according to the Hamas-run health ministry. More than 1.5m people are also displaced, according to the United Nations’ agency for Palestinian refugees (Unrwa).
Israel launched an offensive in the Gaza Strip following Hamas’s deadly 7 October attack, which killed 1,200 people and saw more than 200 others taken hostage from southern Israel.
Fighting has been fierce in the northern part of the 41km (25 miles) long and 10km wide enclave, but blasts have also hit the southern cities of Rafah and Khan Younis.