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.
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.