Doctrine of necessity
The doctrine of necessity is the basis on which extraordinary actions by administrative authority, which are designed to restore order or uphold fundamental constitutional principles, are considered to be lawful even if such an action contravenes established constitution, laws, norms, or conventions. 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 a controversial 1954 judgment, 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 may also refer to the necessity of a judge with a reasonable apprehension of bias continuing to decide a matter if there is no alternative to that judge. The Supreme Court of Canada applied this doctrine in the 1998 Reference re Remuneration of Judges (No 2) case. International law
In international law, the exception is allowed by the UN's International Law Commission (ILC) to be used by a state facing "grave and imminent peril": 

Therefore, an obligation of customary international law or an obligation granted under a bilateral investment treaty may be suspended under the doctrine of necessity. It is "an exception from illegality and in certain cases even as an exception from responsibility." In order to invoke the doctrine of necessity:
 The invoking State must not have contributed to the state of necessity,
 Actions taken were the only way to safeguard an essential interest from grave and impending danger. Instances of invocation
The doctrine of necessity has  been invoked in a number of Commonwealth countries. Pakistan, 1954

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:

 The Governor General in certain circumstances had the power to dissolve the Constituent Assembly. The Governor-General has during the interim period the power 'under the common law of civil or state necessity' of retrospectively validating the laws listed in the Schedule to the Emergency Powers ordinance. The new Assembly (formed under the Constituent Convention Order 1955) would be valid and able to exercise all powers under the Indian Independence Act 1947. 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'. Grenada, 1985
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. Nigeria, 2010: Parliament creates an Acting President
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, was unable 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. United Kingdom, 2022–2023: Northern Ireland Protocol changes
On 13 June 2022, United Kingdom Foreign Secretary Liz Truss introduced the Northern Ireland Protocol Bill in the House of Commons, which, if enacted, would allow the UK government to unilaterally "disapply" (the word used) parts of the Northern Ireland Protocol that it had signed up to, a part of the Brexit withdrawal agreement. The UK government conceded that the bill would mean breaching its obligations under international law but said that its position was justified, explicitly invoking the doctrine of necessity and saying that having to uphold the Protocol was placing unacceptable levels of strain on institutions in Northern Ireland and that there was "no other way" of safeguarding the UK's interests. On 15 June, vice-president of the European Commission Maroš Šefčovič said that there was "no legal nor political justification" for the bill and that it was illegal. He also announced that the Commission would re-open the infringement proceedings against the UK government which had been started in March 2021, including two new counts where it was alleged the UK breached the Protocol. In a session of the Public Administration and Constitutional Affairs Committee on 21 June 2022, Lorand Bartels, Professor of International Law at Trinity Hall, Cambridge, and Malgosia Fitzmaurice, Professor of Public International Law at Queen Mary University of London, were questioned about the use of the doctrine of necessity. Fitzmaurice said that necessity is the "most contentious and controversial" of circumstances which allow treaty terms to be disregarded; she stated that using necessity as a justification "should be very carefully considered" seeing as action could instead be taken using Article 16 of the protocol. Bartels suggested that the necessity doctrine could only be used to breach some parts of the protocol. During the leadership election during the summer of 2022, Rishi Sunak said his preference was a negotiated settlement with the EU while Liz Truss, who was the minister responsible for introducing the Protocol Bill, supported it as a method to "[break] the deadlock in a legal way". Although Truss won that leadership election, she resigned soon after amid a government crisis and Sunak became prime minister. The UK government and the European Commission made a joint statement on 27 February 2023 announcing the Windsor Framework, a legal agreement which addressed concerns around the Northern Ireland Protocol. As a result, the Northern Ireland Protocol Bill was withdrawn and will be allowed to lapse at the end of the current session of parliament. Notes and references

