Wiktionary
n. 1 (context philosophy metaphysics theology English) necessarianism, especially as espoused by http://en.wikipedia.org/wiki/Joseph%20Priestley. 2 (context legal English) A principle whereby a normally criminal act is justified by the necessity of preserving something of greater utilitarian value than that lost or sacrificed; ''not to be confused with self-defence''. 3 (context politics legal English) The principle that, in a situation of emergency or exigent circumstance, a state may legitimately act in ways that would normally be illegal. 4 (context politics legal English) The principle that the laws of an illegal government should be deemed valid insofar as they do not contradict the constitution, justified on the basis that maintenance of government is of greater utilitarian value than maintenance of the law. 5 (context politics international law English) The principle that a state in immediate peril to its existence, from a situation not of its own doing, may in extremis be justified in violating a right of another state.
Wikipedia
The Doctrine of Necessity is the basis on which extra-legal actions by state actors, which are designed to restore order, are found to be constitutional. The maxim on which the doctrine is based originated in the writings of the medieval jurist Henry de Bracton, and similar justifications for this kind of extra-legal action have been advanced by more recent legal authorities, including William Blackstone.
In modern times, the doctrine was first used in a controversial 1954 judgment in which Pakistani Chief Justice Muhammad Munir validated the extra-constitutional use of emergency powers by Governor General, Ghulam Mohammad. In his judgment, the Chief Justice cited Bracton's maxim, 'that which is otherwise not lawful is made lawful by necessity', thereby providing the label that would come to be attached to the judgment and the doctrine that it was establishing.
The Doctrine of Necessity has since been applied in a number of Commonwealth countries, and in 2010 was invoked to justify extra-legal actions in Nigeria.