The article aims to provide a general view of the concept of necessity (la.: necessitas) and its selected manifestations in the legal sphere (theory and practice). The author proves that at the most general level of considerations, the reaction to an emergency always fits in with a specific philosophy of law that conditions the processes of its creation, application and validity. The article mentions several variants of answers to the following fundamental questions: Can the law provide for any exceptions? Should the activity - which was to deal with a particular threat - always be grounded in positive law? If not, how should the acts outside the scope of this law be treated? These themes have been present in legal thought for centuries. Within individual areas of law, references to necessity and the state of necessity manifest themselves in different ways. Selected institutions of canon, criminal, constitutional and international law will be provided as examples and discussed later on. As part of a synthetic review of these cases, the similarities and differences in the perception of necessity (state of necessity) and the ways of integrating it into individual legal solutions are presented.