Israeli President Isaac Herzog has denied that Israel is striking the largest hospital in the Gaza Strip.
The UN has said the situation at Al-Shifa Hospital is dire, with constant gunfire and bombings in the area.
Doctors there have said newborn babies have died after power for incubators was cut off due to a lack of fuel.
When challenged by the BBC's Laura Kuenssberg about those reports, Mr Herzog rejected them as "spin by Hamas" and insisted there was electricity.
The president also showed what he said was a copy of Adolf Hitler's Mein Kampf was found on the body of a Hamas fighter in Gaza.
He 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".
On Sunday morning, the World Health Organization (WHO) said it had lost communication with its contacts at Al-Shifa, with staff and patients trapped by fighting outside.
It warned that the hospital had been reportedly attacked multiple times over the previous two days, leaving several people dead and many others wounded. The intensive care unit had suffered damage, as had areas where displaced people were sheltering, it added.
It also said there were reports that some people who fled the hospital were shot at.
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 for Al-Shifa's generators 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 told the BBC's Sunday with Laura Kuenssberg programme.
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, in which 1,200 people in Israel were killed and some 240 taken hostage back to Gaza, 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. Dr Abu Saada said on Sunday night that three newborn babies had already died.
The Israeli military also released a video of soldiers leaving 15 jerry cans of fuel on the side of a street for the hospital on Sunday but claimed Hamas stopped them being picked up.
However, doctors said the amount would not bring enough power for an hour, while any evacuation of the babies needed specialised mobile incubators.
Asked whether it was time to listen to calls from Israel's allies, including from France's President Macron, for a ceasefire and measures to reduce civilian casualties, Mr Herzog asserted Israel's right to defend itself after the October attacks.
"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.
He accused Hamas of stopping civilians from fleeing northern Gaza when asked about the pictures from Gaza showing many still sheltering in the area and reports that they were unable to leave.
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).
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.
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