Related Rule
Israel
Practice Relating to Rule 8. Definition of Military Objectives
Section I. Presence of civilians within or near military objectives
Israel’s Manual on the Rules of Warfare (2006) states:
It is the duty of the attacker to distinguish between military targets and civilian targets, and the attacker should take into account the presence of civilian targets when planning the attack. No area in which military targets are combined with civilian targets may be considered as merely another target.
Upon attacking a military target that is located at the heart of [a] civilian district, for example, a group of enemy soldiers who are holed up in the heart of a city and surrounded by civilians, they may be attacked, but only if the expected military benefit to one’s side from the offensive exceeds the expected damage that might be caused to civilians. There is no set formula according to which it is possible to weigh the civilian damage against the expected military benefit from the offensive; but it is a question of degree. An offensive would not be considered legitimate if it presented a significant risk to many civilian lives in return for gaining a subordinate military objective. 
Israel, Rules of Warfare on the Battlefield, Military Advocate-General’s Corps Command, IDF School of Military Law, Second Edition, 2006, p. 27.
The manual further states:
Civilians must not be used to screen the military movements and for the purpose of concealment amongst them. This is also the reason why soldiers are under an obligation to wear uniform or identification insignia so as to make it possible to distinguish clearly between them and civilians.
It is nevertheless unreasonable to expect a military force to completely hold its fire in every incident in which opening fire could endanger civilians; if this were the case, the best defence would be simply to surround military targets with civilians.
How should you behave when your adversary breaks this rule and intersperses military targets with civilian installations? (for example, when a military force is located inside a village or a squad of soldiers shelters in a civilian structure – is a commander entitled to shell the entire village? To bomb the building and to demolish it with all its occupants, soldiers and civilians alike?)
It is difficult to provide unequivocal answers to these questions. Each army and each commander needs to deal with this dilemma in ways that stem from the ethical outlook, the degree of risk that can be assumed in order to prevent the killing of innocent people and the nature of the enemy that is being contended with. The answer often depends on the circumstances. The situation can range from that of a large force pursuing a small company of enemy soldiers besieged from every angle, to a situation in which a unit in distress is under fire from a civilian target, for example from the rooftop of a museum. In the first incident the commander should display much more restraint, and in the second, the military needs [to] justify and permit an attack on the party that has misused the location, consequently weakening the protection afforded to the museum. 
Israel, Rules of Warfare on the Battlefield, Military Advocate-General’s Corps Command, IDF School of Military Law, Second Edition, 2006, p. 27.
The Manual on the Rules of Warfare (2006) is a second edition of the Manual on the Laws of War (1998).
In 2006, Israel’s Ministry of Foreign Affairs stated:
But the presence of civilians in the area does not stop a military objective from being a legitimate target. This is not just the law, as noted above, but also the practice of states. The Australian Defence Force Manual reflects the prevailing practice:
The presence of non-combatants in or around a military objective does not change its nature as a military objective. Non-combatants in the vicinity of a military objective must share the danger to which the military objective is exposed.
In practice Israel does not adopt the position reflected here that civilians in the vicinity of a military objective must “share the danger”, but rather takes significant efforts to avoid or minimize civilian casualties. 
Israel, Responding to Hizbullah Attacks from Lebanon: Issues of Proportionality, Legal Background, Ministry of Foreign Affairs of Israel, 25 July 2006, § 2.
In 2007, Israel’s Ministry of Foreign Affairs stated in a diplomatic note:
The presence of civilians in the area, however, does not stop a military objective from being a legitimate target. This is the law, as noted above, and reflected in state practice. Thus, for example, the Australian Defense Force Manual states:
The presence of non-combatants in or around a military objective does not change its nature as a military objective. Non-combatants in the vicinity of a military objective must share the danger to which the military objective is exposed. 
Israel, Israel’s War with Hizbullah. Preserving Humanitarian Principles While Combating Terrorism, Diplomatic Notes No. 1, Ministry of Foreign Affairs of Israel, April 2007, p. 14.
In 2008, in a background paper on Israel’s operations in Gaza, Israel’s Ministry of Foreign Affairs stated:
If a location is a legitimate military objective, it does not cease to be one because civilians are in the vicinity. As Article 28 of … [1949] Geneva Convention [IV] provides:
The presence of a protected person may not be used to render certain points or areas immune from military operations.
Clearly, the deliberate placing of military targets in the heart of civilian areas is a serious violation of humanitarian law, and those who chose to locate such targets in these areas must bear responsibility for the injury to civilians which this decision engenders. … The defender has the primary duty of protecting the civilian population and removing civilians from military targets, if necessary. And … [s]hould civilian casualties ensue from an attempt to shield combatants or a military objective, the ultimate responsibility lies with the belligerent placing innocent civilians at risk.
Nonetheless the callous disregard of those who hide behind civilians does not absolve the state seeking to respond to such attacks from the responsibility to avoid or at least minimize injury to civilians and their property in the course of its operations. In particular this raises the complex issue of proportionality. 
Israel, Ministry of Foreign Affairs, Background paper, Responding to Hamas Attacks from Gaza: Issues of Proportionality, December 2008, § 2.
[emphasis in original; footnotes in original omitted]
In 2009, in a report on Israeli operations in Gaza between 27 December 2008 and 18 January 2009 (the “Gaza Operation”, also known as “Operation Cast Lead”), Israel’s Ministry of Foreign Affairs stated:
99. … [T]the presence of civilians at a site (whether voluntarily or involuntarily) does not by itself forbid an attack on an otherwise legitimate military target. …
100. The expected presence of civilians, though, does impact the analysis of the proportionality of an attack. 
Israel, Ministry of Foreign Affairs, The Operation in Gaza 27 December 2008–18 January 2009: Factual and Legal Aspects, 29 July 2009, §§ 99–100.
[emphasis in original]
The report also stated: “The presence of civilians within a military objective or in its vicinity does not negate as such, the military character of the objective. Such a military objective may be attacked, subject to the principle of proportionality.” 
Israel, Ministry of Foreign Affairs, The Operation in Gaza 27 December 2008–18 January 2009: Factual and Legal Aspects, 29 July 2009, § 223.