# Necessity (criminal law)

In the criminal law of many nations, necessity may be either a possible justification or an exculpation for breaking the law. Defendants seeking to rely on this defense argue that they should not be held liable for their actions as a crime because their conduct was necessary to prevent some greater harm and when that conduct is not excused under some other more specific provision of law such as self defense. As a matter of political expediency, states usually allow some classes of person to be excused from liability when they are engaged in socially useful functions but intentionally cause injury, loss or damage.
For example, drunk drivers might contend that they drove their car to get away from being kidnapped (cf. North by Northwest). Most common law and civil law jurisdictions recognize this defense, but only under limited circumstances. Generally, the defendant must affirmatively show (i.e., introduce some evidence) that (a) the harm they sought to avoid outweighs the danger of the prohibited conduct they are charged with; (b) they had no reasonable alternative; (c) they ceased to engage in the prohibited conduct as soon as the danger passed; and (d) they themselves did not create the danger they sought to avoid. Thus, with the "drunk driver" example cited above, the necessity defense will not be recognized if the defendant drove further than was reasonably necessary to get away from the kidnapper, or if some other reasonable alternative was available to them.
For another example, the fire services and other civil defence organizations have a general duty to keep the community safe from harm. If a fire or flood is threatening to spread out of control, it may be reasonably necessary to destroy other property to form a fire break, or to trespass on land to throw up mounds of earth to prevent the water from spreading.
These examples have the common feature of individuals intentionally breaking the law because they believe it to be urgently necessary to protect others from harm, but some states distinguish between a response to a crisis arising from an entirely natural cause (an inanimate force of nature), e.g. a fire from a lightning strike or rain from a storm, and a response to an entirely human crisis. Thus, parents who lack the financial means to feed their children cannot use necessity as a defense if they steal food. The existence of welfare benefits and strategies other than self-help defeat the claim of an urgent necessity that cannot be avoided in any way other than by breaking the law.
Further, some states apply a test of proportionality, where the defense would only be allowed where the degree of harm actually caused was a reasonably proportionate response to the degree of harm threatened. This is a legal form of cost–benefit analysis.

## Specific jurisdictions
### Canada

In Canada, necessity is recognized as a defence for crimes committed in urgent situations of clear and imminent peril in which the accused has no safe or legal way out of the situation.
Three requirements for defence of necessity:
* Urgent situation of imminent peril or danger
* No reasonable legal alternative
* Proportionality between harm inflicted and harm avoided
The first and second element are evaluated on the modified objective standard. The third element is evaluated on a purely objective standard: R v Latimer, 2001 SCC 1.

### Denmark and Norway

Emergency law/right (nødret, nødrett) is the equivalent of necessity in Denmark and Norway. It is considered related to but separate from self-defence. Common legal examples of necessity includes: breaking windows and other objects in order to escape a fire, commandeering a vehicle to serve as an emergency ambulance, ignoring traffic rules while rushing a dying patient to a hospital, and even killing a person who poses an immediate threat to several other people not including yourself. In the last case self-defense laws are not enough, but the case is covered by nødret. Nødret can only be invoked though when no other option is available.

### English law

Except for a few statutory exemptions and in some medical cases there is no corresponding defense in English law for murder.

### Singapore

Necessity is a defence per the Penal Code. This requires lack of criminal intent, good faith (due care and attention), and the goal of preventing harm. The harm must be sufficiently serious and imminent to justify or excuse the act.

### Switzerland

In two separate cases in 2020, climate activists were not convicted of trespassing and damaging property after holding unauthorized demonstrations in Crédit Suisse branches due to pleading a necessity defense in the face of a climate emergency.

### Taiwan

Necessity is a possible defense per the Criminal Code and the Administrative Penalty Act.

### United States

Necessity as a defense to criminal acts conducted to meet political ends was rejected in the case of United States v. Schoon. In that case, 30 people, including appellants, gained admittance to the IRS office in Tucson, where they chanted "keep America's tax dollars out of El Salvador," splashed simulated blood on the counters, walls, and carpeting, and generally obstructed the office's operation. The court ruled that the elements of necessity did not exist in this case.

#### In specific states

The Winooski 44 case in Vermont resulted in activists being acquitted of charges after using a necessity defense.

## In religious law
### Judaism

In Judaism, the principle of pikuach nefesh allows any law to be broken to save a life, except laws against murder, adultery/incest and blasphemy/idolatry.