That which is committed with the intention to kill or to do a grievous bodily injury, under circumstances which the law holds sufficient to exculpate the person who commits it.
It is justifiable: 1. When a judge or other magistrate acts in obedience to the law; 2. When a ministerial officer acts in obedience to a lawful warrant, issued by a competent tribunal; 3. When a subaltern officer or soldier kills in obedience to the lawful commands of his superior; 4. When the party kills in lawful self-defence.
A judge who, in pursuance of his duty, pronounces sentence of death, is not guilty of homicide; for it is evident that as the law prescribes the punishment of death for certain offences, it must protect those who are entrusted with its execution. A judge, therefore, who pronounces sentence of death in a legal manner, on a legal indictment, legally brought before him, for a capital offence committed within his jurisdiction, after a lawful trial and conviction of the defendant, is guilty of no offence.
Magistrate, or other officers entrusted with the preservation of the public peace, are justified in committing homicide, or giving orders which lead to it, if the excesses of a riotous assembly cannot be otherwise be repressed.
An officer entrusted with a legal warrant, criminal or civil, and lawffully commanded by a competent tribunal to execute it, will be justified in committing homicide, if in the course of advancing to discharge his duty, he be brought into such perils that without doing so, he cannot either save his life, or discharge the duty which he is commanded by the warrant to perform. And when the warrant commands him to put a criminal to death, he is justified in obeying it.
A soldier on duty is justified in committing homicide in obedience to the command of his officer, unless the command was something plainly unlawful.
A private individual will, in many cases, be justified in committing homicide, while acting in self-defence.