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.
On 24 October 1954 the Governor-General of Pakistan, Ghulam Mohammad, dissolved the Constituent Assembly and appointed a new Council of Ministers on the grounds that the existing one no longer represented the people of Pakistan. Stanley de Smith argues that the real reason for the dissolution was because Mohammad objected to the constitution which the Assembly was about to adopt. The President of the Constituent Assembly, Maulvi Tamizuddin, appealed to the Chief Court of Sind at Karachi to restrain the new Council of Ministers from implementing the dissolution and to determine the validity of the appointment of the new Council under Section 223-A of the constitution.
In response, members of the new Council of Ministers appealed to the court saying that it had no jurisdiction to approve the request of the President to overturn the dissolution and appointments. They argued that Section 223-A of the constitution had never been validly enacted into the Constitution because it was never approved of by the Governor-General, and therefore anything submitted under it was invalid. The Chief Court of Sind ruled in favour of President Tamizuddin and held that the Governor-General's approval was not needed when the Constituent Assembly was acting only as a Constituent Assembly and not as the Federal Legislature. The Federation of Pakistan and the new Council of Ministers then appealed to the court, the appeal was heard in March 1955 (Federation of Pakistan v Maulvi Tamizuddin Khan).
In the appeal hearing under Chief Justice Muhammad Munir, the court decided that the Constituent Assembly functioned as the 'Legislature of the Domain' and that the Governor-General's assent was necessary for all legislation to become law. Therefore, the Chief Court of Sind had no jurisdiction to overturn the Governor General's dissolution and it was held as valid.
However, the ground of which the court found in favour of the Federation of Pakistan called into question the validity of all legislation passed by the Assembly, not to mention the unconstitutionality of the Assembly itself since 1950. To solve this problem, the Governor-General invoked Emergency Powers to retrospectively validate the Acts of the Constituent Assembly. An appeal was filed against the Governor-General for invoking emergency powers and the Chief Justice had to determine the constitutionality of invoking the Emergency Powers and whether the Governor-General could give his assent to legislation retroactively.
The Court held that in this case the Governor-General could not invoke emergency powers because in doing so he validated certain laws that had been invalid because he had not assented to them previously. Justice Munir also ruled that constitutional legislation could not be validated by the Governor General but had to be approved by the Legislature. The lack of a Constituent Assembly did not transfer the Legislature's powers over to the Governor-General.
The Court was referred to for an opinion. On 16 May 1955 it ruled:
In his verdict, Munir declared it was necessary to go beyond the constitution to what he claimed was the Common Law, to general legal maxims, and to English historical precedent. He relied on Bracton's maxim, 'that which is otherwise not lawful is made lawful by necessity', and the Roman law maxim urged by Ivor Jennings, 'the well-being of the people is the supreme law'.
In a 1985 judgment, the Chief Justice of the High Court of Grenada invoked the doctrine of necessity to validate the legal existence of a court then trying for murder the persons who had conducted a coup against former leader Maurice Bishop. The court had been established under an unconstitutional "People's Law" following the overthrow of the country's constitution, which had subsequently been restored. The defendants argued that the court before which they were being tried had no legal existence under the restored constitution, and they were therefore being deprived of their constitutional right to a trial before a "Court established by law". The High Court acknowledged that the lower court "had come into existence in an unconstitutional manner", but "the doctrine of necessity validated its acts." On this basis, the murder trials were allowed to proceed.
A related (although non-judicial) use of the doctrine took place when, on 9 February 2010, the Nigerian National Assembly passed a resolution making Vice President Goodluck Jonathan the Acting President and Commander in Chief of the Armed Forces. Both chambers of the Assembly passed the resolution after President Umaru Yar'Adua, who for 78 days had been in Saudi Arabia receiving medical treatment, refused to formally empower the vice president to exercise full powers as acting president, as provided for in Section 145 of the country's constitution. No provision of the Nigerian constitution empowering the National Assembly to pass any such resolution, causing Senate President David Mark to assert that the Senate had been guided by the "doctrine of necessity" in arriving at its decision.
... Dismissing Mirza, army chief General Mohammad Ayub Khan took over first as chief martial law administrator ... a compliant judiciary upheld the imposition of martial law under the doctrine of necessity ...