In criminal law, the principles of Spanish criminal procedure are governed by various rules. On the one hand, the Spanish Constitution recognizes the principle of legality in article 9.3 and refers explicitly, albeit imperfectly, to the principle of criminal legality in its first article 25, paragraph I: the principle of legality is a fundamental principle used by most States, according to which any exercise of official authority must be carried out in accordance with the law in force and its jurisdiction. not according to the will of the people. If a state adheres to this principle, then the actions of its powers are subject to the Constitution and the current state or rule of law. In addition to the principle of legality, there are other fundamental principles that determine criminal law, such as: This relationship between the principle of legality and that of the reservation of rights is generally established in a democracy in the so-called legal system and is subject to special dogmatic treatment in constitutional law, administrative law, tax law and criminal law. Serve a sentence so that those involved in the sentence can repeat the crime that may have arisen. As we have already said, this principle is one of the most important principles of criminal law, since it contains certain guarantees and prohibitions that offer all citizens legal certainty vis-à-vis the State, since they constitute a limitation of the ius puniendi (power of sanctions) of our legal system. The definition of the principle of legality in general and legality in criminal matters derives from criminal law and in particular from Article 1 of the Criminal Code. To punish an act, it is necessary that there be a previous formal criminal law that qualifies it as a crime. It is therefore necessary to specify the requirements necessary for this criminal law: on the other hand, the principle of criminal legality in the field of criminal law is regulated in various articles of the Criminal Code, in particular article 10; 1.1; 2.1 and 4.2 of the above-mentioned Code. : Analogy is defined as “the transfer of a rule established by law for a particular case of fact to another case of similar facts which are not regulated by law”. In this context, article 3.1 of the Criminal Code provides that: “The criminal law shall not apply to cases other than those expressly provided for therein.” At present, on the other hand, it is considered that it is the law that positively determines the administrative act and determines what is not valid if it does not comply with a normative provision in force. The principle of legality then acts as a prior legal cover for any power: if the administration cooperates with it, its actions are legitimate (doctrine of positive link).
 Within the principle of legality, two types can be distinguished: finally, the principle of legality is also recognized in several norms with an international dimension, such as Article 11 of the Universal Declaration of Human Rights; Article 15 of the International Covenant on Civil and Political Rights and article 7 of the European Convention for the Protection of Fundamental Rights and Public Freedoms. From Aboga2, our defense lawyers will try to resolve all your doubts regarding the principle of legality or the rule of law. The principle of legality contains certain guarantees, the first articles of which are provided for in the Criminal Code itself: criminal legality is therefore a limit on the repressive power of the State in the sense that only conduct expressly designated as a crime in a law before the offence is committed can be punished. One of the most important principles of criminal law today is the principle of legality, the essence of which is: Nullum crimen, nulla poena sine praevia lege (there is no crime or punishment without privilege). In addition, the principle of legality includes a number of guarantees contained in criminal law. /December). “The principle of legality”. Revista Española de Derecho Constitucional (Madrid: Centro de Estudios Políticos y Constitucionals) (39): 9-42. Thus, only criminal conduct that meets all the requirements of the type of sentence determined by law can be punished. The principle of legality in criminal law was born and developed over time, where we observe precursors such as Beccaria`s work: “Crimes and Punishments”, based on the social contract of Rousseau and Montesquieu and the separation of powers. Also contained in various declarations of human rights and international covenants and also logically present in Spanish criminal law.
In its original approach, the public administration could not act arbitrarily according to the principle of legality, but by implementing the content of the law.