Military necessity is governed by several constraints: an attack or action must be intended to help in the military defeat of the enemy; it must be an attack on a military objective, and the harm caused to civilians or civilian property must be proportional and not "excessive in relation to the concrete and direct military advantage anticipated".
Luis Moreno-Ocampo, Chief Prosecutor at the International Criminal Court, investigated allegations of war crimes during the 2003 invasion of Iraq and he published an open letter containing his findings. In a section titled "Allegations concerning War Crimes " he did not call it military necessity but summed up the term:
Under international humanitarian law and the Rome Statute, the death of civilians during an armed conflict, no matter how grave and regrettable, does not in itself constitute a war crime. International humanitarian law and the Rome Statute permit belligerents to carry out proportionate attacks against military objectives, even when it is known that some civilian deaths or injuries will occur. A crime occurs if there is an intentional attack directed against civilians (principle of distinction) (Article 8(2)(b)(i)) or an attack is launched on a military objective in the knowledge that the incidental civilian injuries would be clearly excessive in relation to the anticipated military advantage (principle of proportionality) (Article 8(2)(b)(iv).
Article 8(2)(b)(iv) criminalizes:
Intentionally launching an attack in the knowledge that such attack will cause incidental loss of life or injury to civilians or damage to civilian objects or widespread, long-term and severe damage to the natural environment which would be clearly excessive in relation to the concrete and direct overall military advantage anticipated;
Article 8(2)(b)(iv) draws on the principles in Article 51(5)(b) of the 1977 Additional Protocol I to the 1949 Geneva Conventions, but restricts the criminal prohibition to cases that are "clearly" excessive. The application of Article 8(2)(b)(iv) requires, inter alia, an assessment of:
(a) the anticipated civilian damage or injury;
(b) the anticipated military advantage;
(c) and whether (a) was "clearly excessive" in relation to (b).
The judgement of a field commander in battle over military necessity and proportionality is rarely subject to domestic or international legal challenge unless the methods of warfare used by the commander were illegal, as for example was the case with Radislav Krstic who was found guilty as an aider and abbetor to genocide by International Criminal Tribunal for the former Yugoslavia for the Srebrenica massacre.
For the international law of war is not formulated simply on the basis of humanitarian feelings. It has as its basis both considerations of military necessity and effectiveness and humanitarian considerations, and is formulated on a balance of these two factors. To illustrate this, an example often cited in the textbooks may be given, of the provisions of the St. Petersburg Declaration of 1868 prohibiting the use of projectiles under 400 grammes which are either explosive or charged with combustible or inflammable substances. The reason for the prohibition is explained as follows: such projectiles are small and just powerful enough to kill or wound only one man, and as an ordinary bullet will do for this purpose, there is no overriding need for using these inhuman weapons. On the other hand, the use of a certain weapon, great as its inhuman result may be, need not be prohibited by international law if it has a great military effect.