Canadian criminal law allows for a common law defence of necessity. The leading case for the defence was established in the case of Perka v. The Queen  2 S.C.R. 232. In it, Dickson J. described the rationale for the defence as recognition that:
a liberal and humane criminal law cannot hold people to the strict obedience of laws in emergency situations where normal human instincts, whether of self-preservation or of altruism, overwhelmingly impel disobedience.
Each element must be proven on an objective standard. The peril or danger must be more than just foreseeable or likely. It must be near and unavoidable.
At a minimum the situation must be so emergent and the peril must be so pressing that normal human instincts cry out for action and make a counsel of patience unreasonable.
With regard to the second element, if there was a realistic or objectively reasonable legal alternative to breaking the law, then there can be no finding of necessity. Regarding the third element requiring proportionality, the harm avoided must be at least comparable to the harm inflicted.
In R. v. Latimer, the Courts ruled that assisted suicide could not be excused by a defence of necessity.