Cybercrime Law in Morocco
Morocco added a chapter on attacks against “automated data processing systems” to its Penal Code in 2003, and it later joined the Budapest Convention. Cybersecurity is overseen by a defence-linked directorate, and data protection by a separate commission.
Key laws
- Penal Code, arts. 607-3 to 607-11, added by Law 07-03 (Dahir of 11 November 2003):
- Art. 607-3: fraudulently accessing, or remaining in, a data processing system, with imprisonment of one to three months and a fine of MAD 2,000 to 10,000, or either. The penalty is doubled where data is deleted or changed or the system’s functioning is impaired;
- Art. 607-4: aggravated access to systems presumed to hold state-security information or national economic secrets;
- Art. 607-5: hindering or distorting the functioning of a system (one to three years and a fine of MAD 10,000 to 200,000, or either);
- Art. 607-6: fraudulently introducing, altering or deleting data;
- Art. 607-7: forging computerised documents;
- Art. 607-8: attempts, punished like the completed offence.
- Law 05-20 on cybersecurity: endorsed in July 2020, with its implementing decree (No. 2.21.406) in force since 9 August 2022. It sets security duties for operators of critical infrastructure and for service providers.
- Law 09-08 on the protection of personal data (2009): enforced by the National Commission for the Control of Personal Data Protection (CNDP). As of mid-2026 the law had not been comprehensively revised.
Morocco is a party to the Budapest Convention on Cybercrime (ETS 185). The Council of Europe has noted that Moroccan law does not define key technical terms.
Enforcement
The Directorate General of Information Systems Security (DGSSI) is the national cybersecurity authority, and it runs the national CERT (maCERT). The Royal Gendarmerie and the national police (DGSN) have cybercrime units, and the CNDP enforces data protection.
Plain-language overview, not legal advice. The offences date from 2003 and the Penal Code may have been amended since. Read the current text in the official gazette or the Ministry of Justice’s Adala portal and seek qualified advice for any specific matter.
Sources checked 13 November 2026 against a Moroccan legal database’s summary of arts. 607-3 to 607-8, the Council of Europe’s profile of Morocco, and law-firm notes on Laws 05-20 and 09-08. The Penal Code text itself was not read, and the penalties for arts. 607-4, 607-6 and 607-7 are not given.