The United Nations Office for the Coordination of Humanitarian Affairs (UNOCHA), says: “Any military operation around or within hospitals must take steps to spare and protect the patients, medical staff, and other civilians. All feasible precautions must be taken, including effective warnings, which consider the ability of patients, medical staff, and other civilians to evacuate safely.”
Philip-Gay said: “The other party must take all precautions to avoid intentionally targeting civilians.” Even if the hospital was used for “acts harmful to the enemy”, Philip-Gay said, the other party “does not have the right to bombard it for two days and completely destroy it”, citing the need under international law for the response to be “proportionate”.
She added that the other party must give advance warning of its response and that evacuation procedures must be put in place for patients and health workers.
Alternatively, they could be asked “to isolate themselves in a part of the hospital”, she said. But during any military operation against the site, “there have to be doctors to take care of the patients”.
https://www.theguardian.com/world/2023/nov/17/can-hospitals-be-military-targets-international-law-israel-gaza-al-shifa
The Geneva Conventions of 1949 provide special protection, saying "civilian hospitals ... may in no circumstances be the object of attack but shall at all times be respected and protected by the parties to the conflict."
Here's the available evidence of what happened at Al Ahli Arab Hospital in Gaza
Middle East crisis — explained
Here's the available evidence of what happened at Al Ahli Arab Hospital in Gaza
However, this shield is not absolute. The Geneva Conventions go on to say that a hospital can lose this protected status if an armed group uses the hospital to carry out "acts harmful to the enemy."
Legal scholars say a Hamas attack from a hospital could make it a military target, though not immediately.
The Geneva Conventions add that the opposing side, in this case Israel, must give the hospital "due warning" and allow a "reasonable time limit" to see if the attacks stop.
Satellite images show Israeli forces hold ground around Gaza City's water facilities
Goats and Soda
Satellite images show Israeli forces hold ground around Gaza City's water facilities
And any retaliation must be proportionate. A lone gunman firing from a hospital wouldn't give an army the right to destroy the entire building and harm large numbers of civilians, according to lawyers.
https://www.npr.org/2023/11/10/1212073968/israel-gaza-hamas-war-crimes-hospitals

