Justifiable homicide
The concept of justifiable homicide in criminal law is a defense to culpable homicide (criminal or negligent homicide).  Generally, there is a burden of production of exculpatory evidence in the legal defense of justification.  In most countries, a homicide is justified when there is sufficient evidence to disprove (under the "beyond a reasonable doubt" standard for criminal charges, and "preponderance of evidence" standard for claims of wrongdoing, i.e. civil liability) the alleged criminal act or wrongdoing.  The key to this legal defense is that it was reasonable for the subject to believe that there was an imminent and otherwise unavoidable danger of death or grave bodily harm to the innocent by the deceased when they committed the homicide. A homicide in this instance is blameless.

Common excusing conditions
Potentially excusing conditions common to multiple jurisdictions include the following.

Capital punishment in places that it is legal.
Where a state is engaged in a war with a legitimate casus belli, a combatant may lawfully kill an enemy combatant so long as that combatant is not hors de combat. This principle is embedded in public international law and has been respected by most states around the world.
In most countries, it is lawful for a citizen to repel violence with violence to protect someones life or destruction of property.The scope of self-defense varies; some jurisdictions have a duty to retreat rule that disallows this defense if it was safe to flee from potential violence. In some jurisdictions, the castle doctrine allows the use of deadly force in self-defense against an intruder in ones home. Other jurisdictions have stand-your-ground laws that allow use of deadly force in self-defense in a vehicle or in public, without a duty to retreat.
Where the persons death is inflicted by the effecting of lawful arrest or prevention of lawfully detained persons escape, quelling riot or insurrection when the use of force is "no more than absolutely necessary".
The doctrine of necessity allows, for example, a surgeon to separate conjoined twins, killing the weaker twin to allow the stronger twin to survive. (This is not recognized, for example, in England and Wales).
In the United States, the 2005 Unborn Victims of Violence Act changed the legal definition of human fetuses to "unborn children", formally defining feticide as murder (under USC §1111).  However, the law retains explicit exceptions which prohibit the prosecution "of any person for conduct relating to an abortion," "of any person for any medical treatment," or "of any woman with respect to her unborn child," thereby preserving the right to an abortion stemming from Roe v. Wade. However, Roe v. Wade was overturned in 2022 by Dobbs v. Jackson Womens Health Organization.
Several countries, such as the Netherlands, Belgium, Switzerland, Japan, Canada, and the U.S. states of Oregon and Washington allow both active and passive euthanasia by law, if justified.
The "heat of the moment" defense for crimes of passion: death results from a situation where the defendant is deemed to have lost control. This may be considered a part of the defense of provocation against charges of murder. Based on the idea that all individuals may suddenly and unexpectedly lose control when words are spoken or events occur, jurisdictions differ on whether this should be allowed to excuse liability or merely mitigate to a lesser offense such as manslaughter, and under which circumstances this defense can be used. In many common law jurisdictions, provocation is a partial defense that converts what would have been murder into manslaughter.
A few jurisdictions do not prosecute (Iran, Iraq) or have a lesser penalty (Kuwait, Egypt) for honor killings.

European Convention on Human Rights
Article 2 Paragraph 2 of the European Convention On Human Rights provides that death resulted from defending oneself or others, arresting a suspect or fugitive, or suppressing riots or insurrections, will not contravene the Article when the use of force involved is "no more than absolutely necessary":

2. Deprivation of life shall not be regarded as inflicted in contravention of this Article when it results from the use of force which is no more than absolutely necessary:
(a) in defence of any person from unlawful violence;
(b) in order to effect a lawful arrest or to prevent the escape of a person lawfully detained;
(c) in action lawfully taken for the purpose of quelling a riot or insurrection.

Example of Criminal Procedure Act in South Africa
In South Africa, §49 Criminal Procedure Act used to provide:

(2) Where the person concerned is to be arrested for an offense referred to in Schedule 1 or is to be arrested on the ground of having committed such an offense, and the person authorized under this Act to arrest or to assist in arresting him cannot arrest him or prevent him from fleeing by other means than killing him, the killing shall be deemed to be justifiable homicide.
This has now been amended by §7 Judicial Matters Second Amendment Act 122 of 1998:
(2) If any arrestor attempts to arrest a suspect and the suspect resists the attempt, or flees, or resists the attempt and flees, when it is clear that an attempt to arrest him or her is being made, and the suspect cannot be arrested without the use of force, the arrestor may, in order to effect the arrest, use such force as may be reasonably necessary and proportional in the circumstances to overcome resistance or to prevent the suspect from fleeing: Provided that the arrester is justified in terms of this section in using deadly force that is intended or is likely to cause death or grievous bodily harm to a suspect, only if he believes on reasonable grounds-
(a) that the force is immediately necessary for the purpose of protecting the arrestor, any person lawfully assisting the arrestor or any other person from imminent or future death or grievous bodily harm;
(b) that there is a substantial risk that the suspect will cause imminent or future death or grievous bodily harm if the arrest is delayed; or
(c) that the offence for which the arrest is sought is in progress and is of a forcible and serious nature and involves the use of life threatening violence or a strong likelihood that it will cause grievous bodily harm.

Circumstances which justify homicide in the United States
A non-criminal homicide ruling, usually committed in self-defense or in defense of another, exists under United States law. A homicide may be considered justified if it is done to prevent a very serious crime, such as rape, armed robbery, manslaughter or murder. The victim must reasonably believe, under the totality of the circumstances, that the assailant intended to commit a criminal act that would likely result in the death or life-threatening injury of an innocent person. A homicide performed out of vengeance, or retribution for action in the past, or in pursuit of a "fleeing felon" (except under specific circumstances) would not be considered justifiable.
In many states, given a case of self-defense, the defendant is expected to obey a duty to retreat if it is possible to do so. In the states of Alabama, Alaska, Arizona, California, Colorado, Connecticut, Florida, Georgia, Hawaii, Indiana, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Mississippi, Missouri, Montana, New Jersey, North Carolina, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, Tennessee, Texas, West Virginia, Washington, Wyoming and other Castle Doctrine states, there is no duty to retreat in certain situations (depending on the state, this may apply to ones home, business, or vehicle, or to any public place where a person is lawfully present). Preemptive self-defense, in which one kills another on suspicion that the victim might eventually become dangerous, is not justifiable.
In the U.S. Supreme Court ruling of District of Columbia v. Heller, the majority held that the Constitution protected the right to the possession of firearms for the purpose of self-defense "and to use that arm for traditionally lawful purposes, such as self-defense within the home".Two other forms of justifiable homicide are unique to the prison system: the death penalty and preventing prisoners from escaping. To quote the California State Penal Code (state law) that covers justifiable homicide:

196.  Homicide is justifiable when committed by public officers and those acting by their command in their aid and assistance, either--1. In obedience to any judgment of a competent Court; or,2. When necessarily committed in overcoming actual resistance to the execution of some legal process, or in the discharge of any other legal duty; or3. When necessarily committed in retaking felons who have been rescued or have escaped, or when necessarily committed in arresting persons charged with felony, and who are fleeing from justice or resisting such arrest.Although the above text is from California law, many other jurisdictions, like Florida, have similar laws to prevent escapes from custody. Examples include self defense, prevention of criminal act, trespassers, and defense of another person.

Notable cases involving justifiable homicide
Killing of MaKhia Bryant. Her shooting, which prevented her from stabbing another girl, was later deemed a justifiable homicide with prosecutors noting "Under Ohio law the use of deadly force by a police officer is justified when there exists an immediate or imminent threat of death or serious bodily injury to the officer or another."
Sam Cooke. After an inquest and investigation, the courts ruled Cookes death to be a justifiable homicide.
John Dillinger. When BOI agents moved to arrest Dillinger as he exited the theater, he tried to flee. He was shot in the back; the deadly shot was ruled justifiable homicide.
Fred Hampton. In January 1970, the Cook County Coroner held an inquest; the jury concluded that Hamptons and Clarks deaths were justifiable homicides.
George Jackson (activist). Miller had not been charged with any crime, as a grand jury ruled his actions during the prison fight justifiable homicide.
Don King. In 1954, King shot a man in the back after spotting him trying to rob one of his gambling houses; this incident was ruled a justifiable homicide.
Killing of Sara-Nicole Morales. In 2021 Morales confronted several motorists who had followed her to her Florida home following a road rage incident. After she brandished a pistol at them from her front lawn, a motorcyclist she had deliberately struck with her vehicle during the road-range incident drew his own legally carried weapon and shot her several times; she died shortly after arrival at a local hospital. Police declined to file charges several months later.
Eadweard Muybridge. In 1874, Muybridge shot and killed Major Harry Larkyns, his wifes lover, but was acquitted in a controversial jury trial, on the grounds of justifiable homicide.
Johnny Stompanato homicide. After four hours of testimony and approximately 25 minutes of deliberation, the jury deemed Stompanatos killing a justifiable homicide.

Further reading
Omphemetse S. "Use of Deadly Force by the South African Police Services Re-visited".


== References ==