What Is the Principle of Legality?
In any society governed by the rule of law, one question sits at the very foundation of criminal justice: who gets to decide which acts are crimes, and what punishment follows them? The principle of legality answers this with a single, uncompromising rule: only a written law enacted in advance by the legislature can define a crime and set its penalty. If an act was not criminalized by a law in force at the time it was committed, no one may be punished for it. Simple as it sounds, this rule is one of the strongest shields against arbitrary state power ever devised.
The Latin Roots: Nullum Crimen, Nulla Poena Sine Lege
The principle is best known by two Latin maxims: "nullum crimen sine lege" (no crime without law) and "nulla poena sine lege" (no punishment without law). The formulation was given systematic shape in 1801 by the German criminal law scholar Paul Johann Anselm von Feuerbach in his textbook "Lehrbuch des gemeinen in Deutschland gültigen peinlichen Rechts," and it went on to shape the Bavarian Penal Code of 1813. Recent legal-historical research traces the maxim's roots further back, into the late eighteenth century and the legal tradition of the Austrian Netherlands — but it is Feuerbach who is credited with turning it into a cornerstone of modern criminal law.
Four Dimensions of the Principle
Contemporary criminal law doctrine breaks the principle of legality down into four complementary sub-rules.
Non-Retroactivity (Lex Praevia)
An act must already be defined as a crime by law at the moment it is committed. A later-enacted statute cannot retroactively criminalize past conduct — a person must be able to foresee the legal consequences of their actions in advance.
Written Law Requirement (Lex Scripta)
Crimes and punishments must be fixed by a written, enacted statute — not by custom or judge-made rules. This requirement blocks arbitrary and unpredictable interpretation.
Certainty (Lex Certa)
The text of the law must define the prohibited conduct with reasonable clarity. Vague or excessively broad wording makes it impossible for citizens to adjust their behavior accordingly, and is therefore considered a violation of the principle.
Prohibition of Analogy (Lex Stricta)
A judge cannot punish an act that is not covered by law simply because it resembles a defined crime. Criminal provisions must be interpreted narrowly and literally; judges are not granted the power to fill gaps in the law.
From Feuerbach to Today
The philosophical roots of the principle reach back to the Enlightenment — to Montesquieu's doctrine of the separation of powers, and to Cesare Beccaria's "On Crimes and Punishments," which railed against arbitrary punishment. Article 8 of the French Declaration of the Rights of Man and of the Citizen (1789) explicitly proclaimed that no one could be punished except under a law established and promulgated before the offense. In the twentieth century, the principle resurfaced in a contentious form at Nuremberg and in subsequent international criminal trials, where jurists fiercely debated whether the ban on retroactivity could be exceptionally relaxed to prosecute war crimes.
Criticism and Contested Boundaries
Applying the principle in its most absolute form has, in some cases, sparked serious controversy. Nazi officials tried at the Nuremberg International Military Tribunal argued in their defense that the acts they had committed were not covered by any explicit international criminal norm at the time, and that prosecuting them therefore violated the ban on retroactivity. The tribunal rejected this objection, holding that the acts in question were already part of established customary international law and the general principles of law recognized by civilized nations. That dispute still keeps alive a live question today: how should the "written law" requirement of the principle of legality be interpreted in international law, where custom and general principles also carry legal force?
A similar tension arises in fast-moving areas of technology. Cybercrime or AI-enabled fraud can easily fall outside the explicit scope of existing statutes. Courts must then decide cases strictly within the wording of the law in force, without violating the prohibition of analogy — which can create friction between the public's sense of justice and the demand for legal certainty. Legal systems typically try to close this gap by speeding up new legislation, since it is the legislature, not the judiciary, that is permitted to fill such gaps.
The Principle in International Law
Today the principle of legality appears in nearly every democratic constitution and in major international human rights instruments. Article 7 of the European Convention on Human Rights guarantees that no one shall be held guilty of a criminal offense on account of any act which did not constitute an offense under national or international law at the time it was committed. Similar guarantees appear in the UN International Covenant on Civil and Political Rights and in the Rome Statute that established the International Criminal Court. This near-universal adoption has transformed the principle from a domestic criminal-law rule into a foundational norm of international law.
Why It Matters
The principle of legality is one of the most basic protections an individual has against the state. It lets citizens know in advance what conduct is forbidden, prevents courts from interpreting the law arbitrarily, and ensures that the power to criminalize behavior belongs exclusively to a democratically legitimate legislature. Far from being a mere technicality, it is a concrete expression of the rule of law and the separation of powers.
The principle of legality is also closely tied to the other core guarantees of criminal procedure. Knowing in advance which acts can lead to prosecution is itself a precondition for an effective defense: a defendant cannot truly prepare a defense without knowing the legal basis of the charge against them. In that sense, the principle of legality is more than a standalone rule — it functions as the framework on which the other guarantees of criminal justice are built.

