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.