Join our Newsletter — 33% off our NHI Course
Home› Guides› Morocco Cyber Security Law 05-20: DGSSI obligations for…
Guide Regulations & Frameworks

Morocco Cyber Security Law 05-20: DGSSI obligations for operators

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 14 November 2026 12 min read
On this page

Morocco's Law 05-20 on cybersecurity places binding security, audit, incident reporting and data hosting duties on public bodies, operators of vital infrastructure and digital operators, enforced by the national cybersecurity authority with fines of up to MAD 400,000 that double for repeat offences. Unlike the personal data law, it is not about individuals' rights: it is about keeping information systems that the state and economy depend on secure and reportable. This guide sets out who the law covers, the duties for each class of entity, the role of the General Directorate of Information Systems Security (DGSSI), the sanctions, and a practical compliance plan. It is written for CISOs, IT and risk leads at Moroccan public bodies, vital infrastructure operators, telecom and internet providers, cloud and digital service providers, and the suppliers who serve them. Personal data duties under Law 09-08 are covered in the Morocco Law 09-08 guide and are not repeated here.

Key takeaways

  • Three classes of obligated party: entities (state administrations, local authorities, public institutions and companies), vital infrastructures (infrastructures d'importance vitale), and operators including telecom networks, internet access providers, cybersecurity service providers, digital service providers and internet platform publishers.
  • Report incidents as soon as you know: article 8 requires an entity to declare an incident to the national authority as soon as it becomes aware of it, and to supply further information without delay on request.
  • Sensitive data stays in Morocco: article 11 requires sensitive data to be hosted exclusively on national territory, and outsourcing contracts must be governed by Moroccan law.
  • Homologate before go-live: every sensitive information system of a vital infrastructure must be security accredited before it goes into operation, and outsourced audit and cybersecurity services must come from providers the authority has qualified.
  • Fines by severity: MAD 200,000 to 400,000 for hosting sensitive data abroad, running unhomologated sensitive systems or using unqualified providers, and MAD 100,000 to 200,000 for reporting and cooperation failures.

Status, texts and the authority

Law 05-20 was promulgated by Dahir 1-20-69 of 25 July 2020 and published in the Bulletin officiel no. 6906 of 6 August 2020. Article 53 makes its entry into force depend on publication of its implementing texts. The main implementing text is Decree 2-21-406 of 15 July 2021. Digital Policy Alert, citing the DGSSI's own publication, records the decree in force from 9 August 2022, with vital agencies and infrastructures required to classify their information systems and inform the DGSSI by that date.

The law itself does not name the DGSSI: article 1 says the national cybersecurity authority is designated by regulation, and article 38 lists its missions. Those missions include implementing the state's cybersecurity strategy, setting protection rules, qualifying audit and cybersecurity service providers, carrying out controls, and coordinating the response to incidents. Article 39 obliges the authority to keep the sensitive information it receives confidential. Above it sit a national cybersecurity strategic committee, which sets strategy and reviews the authority's annual report (article 35), and a crisis management committee that coordinates the response to major incidents and can order measures for entities and infrastructures (articles 36 and 37).

ItemDetailSource
LawLaw 05-20 on cybersecurityDahir 1-20-69, 25 July 2020
PublicationBulletin officiel no. 6906, 6 August 2020BO
Entry into forceOn publication of implementing textsArt. 53
Implementing decreeDecree 2-21-406, 15 July 2021; in force 9 August 2022 per DGSSI publicationDecree; Digital Policy Alert
AuthorityNational cybersecurity authority designated by regulation; the DGSSIArts. 1, 38 to 42
GovernanceStrategic committee; crisis management committeeArts. 35 to 37
SanctionsMAD 100,000 to 400,000, doubled for repeat offences, confiscationArts. 48 to 52

Who must comply

ClassWhoCore dutiesArticles
EntitiesState administrations, local authorities, public institutions and companiesSecurity policy and risk management, audits, asset classification, security officer, monitoring, incident declaration, continuity plan, outsourcing rules, national hosting of sensitive data3 to 13
Vital infrastructuresInfrastructures whose failure would disrupt vital functions of society, designated by sector authorities after consulting the national authorityEverything for entities, plus a secret list of sensitive systems, homologation, audits on request, qualified providers14 to 25
Network operators and internet access providersTelecom network operators and ISPsOne year retention of technical data, customer vulnerability notices, reporting detected events without delay, deploying detection markers supplied by the authority26 to 31
Digital service providersProviders of digital services, including cloud, and internet platform publishersRisk identification, technical and organisational measures for continuity, reporting significant incidents, authority controls32 to 34
Cybersecurity service providersAudit and security service firmsQualification by the authority where they serve vital infrastructures or perform regulated audits25, 38

The list of vital infrastructures is secret and updated at least every two years (article 16), so an organisation should not assume it is out of scope because it is not on a public list. Its sector authority or the DGSSI is the place to confirm designation. For how other countries designate critical operators, see the Critical Infrastructure Regulation Map.

Obligations for entities

  • Security policy and risk (art. 4): adopt an information systems security policy and identify and manage risks.
  • Audits (art. 4): audit any system that offers digital services to third parties before it goes live, and audit systems regularly. The law sets no fixed interval, so document the frequency your risk analysis supports.
  • Classification (art. 5): classify assets by sensitivity and apply proportionate protection.
  • Security officer (art. 6): appoint a person responsible for information systems security, who is also the authority's point of contact.
  • Detection (art. 7): run detection and supervision means.
  • Incident declaration (art. 8): declare incidents to the authority as soon as you become aware of them.
  • Continuity (art. 9): keep a continuity and recovery plan and test it regularly.
  • Outsourcing (arts. 10 to 13): outsourced sensitive systems follow the authority's rules; contracts are governed by Moroccan law and cover information protection, auditability and reversibility; sensitive data is hosted only in Morocco.

Additional duties for vital infrastructures

  1. Sensitive systems list (arts. 17 and 18): based on a risk analysis, submit the list of sensitive information systems to the authority. The list is secret. After the authority's observations, the operator has two months to amend it.
  2. Homologation (art. 19): security accredit each sensitive system before it goes into operation, following the authority's homologation guide.
  3. Audits (arts. 20 to 24): sensitive systems are audited at the authority's request by the authority or a qualified auditor, and the operator must follow up recommendations with an action plan.
  4. Qualified providers (art. 25): outsourced cybersecurity services must come from providers the authority has qualified.

Article 2 defines a sensitive information system as one handling data whose compromise would harm an entity or a vital infrastructure. The law does not separately define "sensitive data", so the classification work under article 5 and any authority guidance determine what article 11's national hosting rule catches. Read it together with the Data Localisation Laws Map when designing cloud and backup architecture.

Incident reporting in practice

Law 05-20 uses immediacy language rather than an hour count: entities report as soon as they become aware of an incident (article 8), operators report detected events without delay (articles 30 and 31), and digital service providers report significant incidents (article 33). Treat "as soon as aware" as hours, not days, and build the procedure so that the security officer can file an initial report before the investigation is complete, then supplement it on request. A single incident may also need assessment under Law 09-08 and, for groups with EU customers, under GDPR. See the Breach Notification Laws by Country Guide and the Incident Response Plan Template.

  • Triggers to define: what counts as an incident affecting your systems, what makes one significant for a digital service provider, and who decides.
  • Evidence to preserve: the one year technical data retention for operators (article 26) is a floor for connection logs; entities should align their own log retention so they can answer authority follow-up questions.
  • Customers: operators must inform customers of vulnerabilities (article 27), which needs a communication path separate from the authority report.

Sanctions

ArticleConductFine (MAD)
49Hosting sensitive data outside Morocco; operating a sensitive system without homologation; using unqualified auditors or cybersecurity providers200,000 to 400,000
50Failing to report incidents (arts. 8, 30, 33); obstructing audits or controls; breaching arts. 26, 28, 32 or 34100,000 to 200,000
51Confiscation of tools used to commit offencesNot a fine
52Repeat offence within the defined periodPenalties doubled

Where identity fits

Several article 4 to 7 duties turn on who and what can reach sensitive systems. Homologation and audit evidence will ask how administrators, suppliers and automated processes authenticate, and the outsourcing rules make supplier access a contract matter. Service accounts, API keys and cloud workload roles that touch sensitive systems belong in the article 5 classification and the article 7 monitoring scope, and supplier maintenance access should use strong authentication and recorded sessions. See the Service Account Security Guide and the Vendor Privileged Access Management (VPAM) Guide.

Compliance plan

  1. Determine your class: entity, vital infrastructure (ask your sector authority), network operator, digital service provider or cybersecurity service provider. Groups can hold several classes through different subsidiaries.
  2. Appoint the security officer: name the article 6 officer, give the role authority to file reports, and register the contact with the DGSSI.
  3. Classify and locate data: classify assets by sensitivity, then map where each sensitive dataset, backup and log is stored and processed, including SaaS and cloud regions.
  4. Fix hosting and contracts: move sensitive data held abroad to Moroccan hosting, and amend outsourcing contracts for Moroccan governing law, auditability, reversibility and incident cooperation.
  5. Vital infrastructures only: complete the risk analysis, submit the sensitive systems list, plan homologation for each system before go-live, and engage only qualified audit and security providers.
  6. Build the reporting path: define triggers, an initial report template and an escalation route, and rehearse it in a tabletop with legal and communications.
  7. Test and audit: run the pre-go-live audit for new external digital services, test the continuity plan, and track audit findings to closure with an action plan.
  8. Review: recheck the decree, authority guidance and your designation status at least annually; roll back any change that breaks continuity by keeping the previous configuration until the new hosting or control is proven.

Decision guidance

  • Public company or private firm: public institutions and companies are entities by default; private firms are caught when designated as vital infrastructure or when they act as an operator or digital service provider.
  • Cloud hosting: where data is classified sensitive, choose Moroccan hosting; for non-sensitive workloads, international cloud remains possible, so the classification decision drives architecture cost.
  • Internal audit or qualified provider: vital infrastructures must use qualified providers for outsourced cybersecurity services; other entities can use internal audit for regular audits, but a qualified provider makes the evidence easier to defend.
  • Small organisations: a small public body still needs the officer, policy, incident path and continuity plan; scale the depth of risk analysis, not the existence of the duties.

Detection and measurement

  • Reporting speed: time from detection to initial report to the authority, against an internal target in hours.
  • Hosting compliance: percentage of sensitive datasets, including backups, hosted in Morocco.
  • Homologation coverage: sensitive systems in production with current homologation, target 100 per cent.
  • Audit follow-up: audit recommendations closed by their action plan date.
  • Provider qualification: share of outsourced security services delivered by qualified providers.
  • Log retention: days of technical data retained against the one year operator requirement.

Common failure patterns

  • Waiting for the full picture before reporting: article 8 runs from awareness, not from the end of the investigation.
  • Backups and logs abroad: primary data is moved to Moroccan hosting but replicas, backups or SIEM copies stay in foreign regions.
  • Go-live before homologation: project timelines that schedule accreditation after launch, which is an article 49 offence for sensitive systems.
  • Unqualified suppliers: procurement selects an audit or managed security firm without checking qualification status.
  • Assuming non-designation: treating the secret vital infrastructure list as proof you are out of scope.
  • Machine access outside scope: classification and monitoring that cover staff accounts but not integration accounts and API keys reaching sensitive systems.

Framework mapping

Law 05-20 dutyNIST CSF 2.0NIST SP 800-53 Rev. 5ISO/IEC 27001:2022 Annex A
Security policy and risk management (art. 4)GV.PO, ID.RAPM-1, RA-3A.5.1
Asset classification (art. 5)ID.AMRA-2A.5.9, A.5.12
Security officer (art. 6)GV.RRPM-2A.5.2
Detection and supervision (art. 7)DE.CMSI-4A.8.16
Incident declaration (arts. 8, 30, 33)RS.COIR-6A.5.24, A.6.8
Continuity plan (art. 9)RC.RPCP-2A.5.30
Outsourcing and qualified providers (arts. 10 to 13, 25)GV.SCSR-6A.5.19, A.5.20
Audits and homologation (arts. 4, 19 to 24)ID.IMCA-2, CA-6A.5.35
Log retention (art. 26)PR.PSAU-11A.8.15

Practitioner checklist

  • Record which Law 05-20 class applies to each Moroccan entity, and confirm vital infrastructure status with the sector authority.
  • Appoint and register the article 6 security officer.
  • Adopt a security policy and documented risk analysis.
  • Classify assets and confirm all sensitive data, backups and logs are hosted in Morocco.
  • Put Moroccan governing law, audit, reversibility and incident clauses in outsourcing contracts.
  • Homologate sensitive systems before go-live and keep the evidence.
  • Use only authority qualified audit and cybersecurity providers where required.
  • Rehearse an "as soon as aware" incident report to the DGSSI.
  • Test the continuity plan and track audit actions to closure.
  • Review the decree and authority guidance annually.

Standards and references

Related NHI Mgmt Group resources: Morocco Law 09-08 · Critical Infrastructure Regulation Map · Data Localisation Laws Map · Global Cybersecurity Regulatory Map. This guide summarises Morocco's Law 05-20 on cybersecurity as checked on 14 November 2026 and is not legal advice.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 14 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.