The principle of legality is one of the most important principles in modern criminal law. It requires that no conduct be punished without a law that clearly describes the punishable act and the punishment provided for it. In western law it has been recognised since the 18th century. Iranian legal scholars state that it has been recognised in Islam for 1,400 years based on sources such as the Qur’an (17:15) which states: ‘we do not punish anybody without having sent a messenger before’ or the famous hadith raf‛ that states that the responsibility for nine things is lifted from humans due to error and the lack of knowledge. They also refer to the principle of qubÎ ‛iqÁb bilÁ bayÁn, the ‘evil of a punishment without informing (of the crime)’ which is deduced from the Shi‛a legal source of reason (‘aql). In Iranian law, the principle of legality was fixed for the first time in Article 12 of the supplementary constitutional law of 1907 and later in Articles 2 and 6 of the criminal code of 1926.
After the Islamic revolution of 1979 and the foundation of the Islamic Republic of Iran, a new constitution, enacted in autumn 1979, provides that all law in the new state has to be Islamic (Article 4). It also contains some articles which mention the principle of legality. These are Article 36: ‘A sentence to punishment and its execution must only be by the decision of a competent and by virtue of law’, Article 166: ‘The verdicts of courts must be well reasoned out and documented with reference to the articles and principles of the law in accordance with which they were delivered’ and Article 169: ‘no act or omission may be regarded as a crime with retrospective effect on the basis of a law framed subsequently.’
Also in the criminal codes enacted after the Islamic revolution (1982/1983, 1991/1995,2013) the principle of legality is guaranteed to a certain degree. For example, Article 2 of the Law on Islamic Punishment of 1982 (1361) states that: ‘Every act and every omission of an act which according to the law entails punishment or measures for the prevention of crime and reformation of offenders is regarded as a crime and no act can be regarded a crime if punishment or measures for the prevention of crime and reformation of offenders are not provided for it according to the law.’ This provision was considerably modified in the Islamic Penal Code (IPC) of 1991 and its wording remains unchanged in the new code of 2013. Now Article 2 of the IPC states: ‘Every act and every omission of an act for which a punishment is foreseen in the law, is regarded as a crime.’ It seems that the legality principle is not protected in the same way as before, as the second part of the sentence was cancelled which stated that only acts or omission of acts for which punishments are foreseen in the law are regarded as crimes.
Additionally, the principle of non-retroactivity laid down in Article 6 of the Law on Islamic punishment of 1982 was replaced by and restricted in Article 11 of the IPC of 1991 and Article 10 of 2013. This provision is problematic: ‘In state provisions, every punishment or measure of security and education must be based on a law which was enacted before the commission of the crime …’ Here, the characteristic structure of Islamic criminal law plays a decisive role: Islamic criminal law divides crimes into different groups often governed by different principles, namely crimes punished with hadd (pl. hodud), with retaliation (qesas) and blood money (diya) and with ta‛zir (and from 1991-2013 bazdarande). Hadd, qesas and diya punishments are regarded as divine punishments, whereas ta‛zir (and bazdarande) punishments are regulated in laws made by humans. The difference between the three types of crimes is also important in the question of the retroactivity of a law. The limitation to state provisions in Article 10 means that the principle of non-retroactivity does not apply to crimes punished with hadd, qesas or diya punishments. Every adult Muslim is supposed to know them, though they did not exist in the former penal code. In the eyes of the supporters of this regulation the question of retroactivity of a law does not arise: as these punishments were fixed by the Shari‛a, they had been in force since the revelation of Islam.
The question which has caused the most heated discussion, however, is the meaning of Article 167 of the Constitution of Iran and its influence on criminal law. Though Articles 36, 166 and 169 of the Constitution guarantee the principle of legality, Article 167 of the Constitution seems to contradict it fundamentally. Article 167 sets out that ‘the judge is bound to endeavour to judge each case on the basis of the codified law. In case of the absence of any such law, he has to deliver his judgment on the basis of authoritative Islamic sources and authentic fatwas. He, on the pretext of the silence of or deficiency of law in the matter, or its brevity or contradictory nature, cannot refrain from admitting and examining cases and delivering his judgment.’
There were many efforts to find an interpretation that renders this principle compatible with the principle of legality. Legal scholars proposed different ways. According to one opinion, Article 167 directly permits punishment for an act that is regarded as a crime under religious law, but not under positive law. Others hold that Article 167 refers to civil law only, not to criminal law. A third group of scholars argued that judges could only fill a lacuna by interpreting certain notions of Islamic law that had not been explained in the written law, but not create a new basis for punishment. Apart from this discussion that can be described only very roughly it has to be remarked that in the codified law there have always been regulations that clearly show that it should be possible to punish a conduct that was not provided for as a crime in the codified law such as Article 289 of the 1982 law modifying some articles of the criminal procedure code, Article 8 of the Law on the formation of general and revolutionary courts of 1373/1994 or Article 214 of the Code of Criminal Procedure of 1999.
The new Criminal Code of 2013 contains some provisions that will bring this discussion to an end. On the one hand, the principle of legality is confirmed (Art. 2, 10), albeit with some limitations. On the other hand, Article 220 refers to Article 167 in the following form: ‘In the case of hodud which are not mentioned in this law, it will be acted according to Article 167 of the Constitution of the Islamic Republic of Iran.’
This means that every conduct which is covered by one of the crimes punishable with hodud punishments can be punished even if they are not laid down as a criminal provision in the criminal code or any other Iranian law. In practice, this may gain some importance in cases of apostasy from Islam which is clearly regarded as punishable in Islamic law but not stipulated as a crime in the Iranian codified law.
 A. R, Milani, Negaresh bar asl-e qanuni budan-e jara’em wa- mojazatha ( A description of the principle of the legality of crimes and punishments), 2007: Tehran: Nashr-e Mizan:, 98-99.
 Milani 2007: 103.
 Milani, 2007: 41- 42.
 Meaning deterrent
 All the translations of the Iranian constitution of 1979 are taken from http://www.law.yale.edu/rcw/rcw/jurisdictions/assc/iranislamicrepof/iran_constitution.doc,
 A. Zira‘at, Hoquq-e jaza-ye ‘omumi (General criminal law), 2006 : vol. 1. Tehran: Entesharat-e Qoqnus. 3rd ed: 69.
 S. M Mohaqqeq-Damad, Qawa‛ed-e feqh – bakhsh-e jaza’i (The rules of Islamic Jurisprudence – Penal section). 2000 : Tehran: Markaz-e Nashr-e ‛Olum-e Eslami (1379/2000): 38 ; I. Golduziyan, Hoquq-e jaza-ye ‛omumi-ye Iran (The general part of Iranian penal law). 1.vol, 2007  Tehran: Entesharat-e Daneshgah-e Tehran, 10. ed.: 213; M. J Habibzadeh,. Usul-e qanuni budan-e jorm wa-mojazat: zamanat-e ejra-ye hoquq-e shahrwandi dar qalamru-ye hoquq-e kaifari (Legality principle of crime and punishment: The guarantees of the rights of the citizen in the field of criminal law), 2005-2006 [1384-1385] and Hoquq-e omumi va-hoquq-e bashari (Human Rights and Public Law) 1st-2nd year, 2005-2006 [1384-1385]): 73.
 G. Eftekhar Jahrumi, G. 1999. Asl-e qanuni budan-e jara‘im wa-mojazat wa-tahawwolat (The principle of the legality of crimes and punishment and its developments). Majalle-ye tahqiqat-e hoquqi (Revue de Recherche Juridique) 25-26, 1999 [1378/1999]: 97 and Milani (2007-as above): 131.
 See for further details, S. Tellenbach, 2013. The Principle of Legality in the Iranian Constitutional and Criminal Law. In: S.A.Arjomand and N. J. Brown. The Rule of Law, Islam and Constitutional Politics in Egypt and Iran. (New York: Suny Press 2013): 109-113.
 Tellenbach (2013):113-116.
 Published in the Official Gazette (of Iran) Nr. 19873 of 27.5.2013 [6.3.1392].