8 min read

The Online Regulation Series | Morocco

You can access the ORS Handbook here

Morocco’s online regulatory framework consists of  different laws and codes that strive to  limit the spread of content that can pose a threat to the Kingdom’s “integrity, security and public order”. Central to this framework are the 2003 Anti-Terrorism Law passed in the aftermath of the 2003 Casablanca bombings and the 2016 Press Code that lays out limitations journalisitic publications and public speech. However, the existing regulatory framework is not explicitly clear regarding implications for tech platforms and the government’s powers to filter the online space – something which has been criticised by civil society. According to Freedom House, the government also resorts to “extralegal means” to remove content that it deems “controversial or undesirable” by pressuring media outlets and online figures to delete such content.

Morocco’s regulatory framework:

  • Loi n° 03-03 relative à la lutte contre le terrorisme, May 2003, Morocco’s legal framework for countering terrorism, providing definitions of key terms (such as “terrorist acts”) and laying out the different sanctions and legal processes: 
    • The law prohibits the diffusion of terrorist content by any means of speech (oral or written), including audio-visual and electronic material
    • Beside acts of terrorism, the 2003 law also covers incitement to and condoning or apology of terrorism (“apologie du terrorisme”), as well as providing assistance to the preparation of a terrorist act and the non-disclosing of a terrorist offence
    • Article 218.2 sanctions apology of terrorism with jail terms and fines, whilst article 218.5 sanctions incitement and “provocation” of terrorism
  • Loi relative a la presse et a l’édition, August 2016, Morocco’s Press Code, regulating the press and public speech in general, including speech and journalistic content posted online:
    • Title III of the Press Code, related to the “special protection of certain rights”,[1] specifies limitation to freedom of the press and public speech. In particular, it prohibits publication that threatens “public order”, including those that prejudice “Islamic religion, the monarchy, or the integrity of the Kingdom”.
    • Article 72, in particular, penalises the diffusion, by any means (including electronic) and by all individuals of:
      • Diffusion in bad faith of allegations, and of false or falsified information that have led to disruption to the public order or fear amongst population[2]
      • Terrorism apology
      • Incitement to hatred and racial hatred
    • Following articles under Title III further lays out restrictions to journalistic content and public speech, including related to the prohibition of defamation, libel, and slander.
    • Speech offences under the Press Code are sanctioned with various fines depending on the offence.
  • Code Penal Marocain (2018 consolidated version), similarly to the Press Codethe Kingdom’s Penal Code sanctions certain non-violent speeches, including speech that are “showing a lack of due respect for the king, defaming state institutions, and insulting public agents while they are performing their duties”.
    • However, unlike the Press Code, the Penal Code punishes speech offences with prison terms.
  • Draft law no. 22.20, so-called “social media law”, passed in March 2020 and later temporarily suspended in May 2020 whilst awaiting the end of the Covid-19 pandemic:

Key takeaways for tech platforms:

  • Under the current legislative framework, internet platforms are exempt from liability for user-generated content, including terrorist content, with liability lying with the content’s creator or poster.
  • Article 37 of the  Press Code stipulates that judicial authorities can request the (provisional) removal of online content that violates the dispositions specified under Title III of the same Code.

Anti-terrorism law and the penalisation of incitement and apology

Morocco’s counter-terrorism framework was developed after the 2003 Casablanca bombings,  which brought the Moroccan parliament to unanimously adopt the Anti-Terrorism law that had been debated since 2002. The night of 16 May 2003, Casablanca – Morocco’s biggest city and economic hub – was hit by one of the worst terrorist attack in the Kingdom’s history: 14 terrorists, all Moroccan citizens, launched a series of attacks on Belgian, Jewish and Spanish buildings, killing 45 people. The attack was coordinated by Salafiya Al Jihadiya, a terrorist group affiliated with al-Qaida. Labelled the “Moroccan 9/11”, the attacks led to a strong counter-terrorist response from the Moroccan government, with the Anti-Terrorism law passed less than 10 days after, and over 200 people arrested in connection with the attacks.

The Anti-Terrorism law broadly defines terrorism undertakings that aims to “seriously undermine public order through intimidation, terror or violence”, before specifying different acts that are considered “terrorist”. Under the law, terrorist use of the internet is mostly addressed through the question of incitement and apology, both of which are penalised. The law strictly prohibits the diffusion by any means – whether by oral proclamation on the street or by audio-visual content shared by an electronic means – of speech that either condones or incites to acts of terrorism. Individuals found condoning an act of terrorism or provoking others to commit such acts can face jail terms and substantial fines.

The Anti-Terrorism law does not directly address the responsibility and liability of tech platforms with regard to terrorist content online. There is also some uncertainty with regards to the scope of the powers conferred to Moroccan authorities regarding online content and terrorist exploitation of internet technologies. The law permits judicial authorities to request the interception and the seizure of communications in relation to a terrorist investigation, or in “extreme emergency” situations. It also sanctions with prison time, for individuals, or with a fine, for a legal entity, the non-disclosure of terrorist offences. However, the law in itself remains broad into specifying what the seizure of communications and non-disclosure entails. Potentially, both provisions can apply to internet service providers  (ISPs). Freedom House’s Freedom on the Net 2020 report on Morocco notes that “intermediaries must block or delete infringing content when made aware of it or upon receipt of a court order”, and that the prosecution of complicity with an act of terrorism, specified in Article 218.6  of the Anti-Terrorism law, could potentially apply to site owners and (ISPs).

Regulation of public speech

Regulation of online content in Morocco is tied to restrictions specified in the 2016 Press Code, which limits journalistic content and online public speech by invoking the “special protection of certain rights”[3] – related to the safeguarding of, amongst other, public order, child protection, and protection from defamation. Core to this Code is the possibility for the government to order the shutdown of any media publication that poses a risk to the protection of public order. Namely, any publication that undermines, amongst others, the Kingdom’s territorial integrity, insult or offence the monarchy, or incite to discrimination or hatred.

Whilst the law is targeted at new outlets, some of its provisions also cover public speech. Similar to the Anti-Terrorism law, the Press Code sanctions the public diffusion, by any individual, of speech and content that disrupt “public order”, including incitement to and apology of terrorism. Furthermore, the provisions related to publications shared by online means have been criticised on the basis that it could be interpreted in a broad manner, thus allowing for the sanctioning of online content in general.  The 2016 Press Code, contrary to its predecessor, does not sanction any speech offence by jail time. However, it states that certain journalistic content, including that deemed to condone or incite to terrorism, can be ordered to be removed by judicial authorities.

The Moroccan Penal Code lists similar limits to freedom of speech than the Press Code. However, and in a major difference, speech offences under the penal code can be penalised with jail times. Specifically, anyone who undermines “the Islamic religion, the monarchy or incites to undermine the territorial integrity of the Kingdom.”[4] can face up to 2 years imprisonment and a 200.000 Dirham fine (around 20,000 USD). This provision, under Article 267-5, also applies to speech and content shared online.

Civil society groups, including Human Rights Watch and Freedom House, have raised concerns with the Penal Code being used to silence non-violent speech that criticises the government and the monarchy online – including content shared on social media and video hosting platforms such as Youtube. A February 2020 report by Human Rights Watch (HRW) underlines rising concerns for online freedom of expression in the Morocco. According to HRW, “at least 10 activists, artists, or other citizens who did nothing but peacefully express critical opinions via Facebook posts, YouTube videos, or rap songs” were arrested in the period between September 2019 and the publication of the report. 

Draft social medial law: from consumer reviews to 24h removal deadline.

In March 2020, the Government Council approved draft law No 22.20, the so-called “social media law”. A backlash on social media ensued with the draft being leaked online by Mustapha Swing, an online content creator. The leak, to this day the only “public” version of the draft law, revealed that online users calling for the boycott of certain products could face not only fines but also up three years of jail time, and that ISPs would be required to register to be allowed to operate in the Kingdom. Platforms failing to comply with the requirements laid out in the draft law could face administrative fines, a temporary suspension of their services, as well as the risk of their operating license being withdrawn.

Whilst the draft law mostly stems from a 2018 boycott of Afriquia Gaz, Centrale Danone and Sidi Alii products,[5] certain of its provisions could have significant impacts for online freedom of expression. Article19 and MENA Rights Group further shed light on this via a legal analysis shared with the UN Special Rapporteur on freedom of opinion and expression in June 2020. The groups focus on Articles 8, 10, 11 and 12 of the draft law. Article 8 would grant “broad censorship powers to network providers” by requesting ISPs to remove and restrict access to online content that “constitutes a dangerous threat to security, public order or which would be likely to undermine the constants of the Kingdom” within 24 hours. The language used here to sanction certain online content is further extending the provisions used in the Press and Penal Codes. A short removal deadline that, according to Article19, does not allow for proper assessment of the illegality of online content and that risks platforms over censoring content to comply with the law. Further, Article19 notes that delegating the adjudication of illegality of online content to online platforms is contrary to international standards and risk the “privatisation of judicial prerogatives”. Article19 also recalls the French Constitutional Council’s recent censuring of the “cyber-hate law” which included similar provisions. On Articles 10, 11, and 12, Article19 is particularly critical of the law establishing a “control body” without providing any further information regarding said body and its establishment.

Following  public backlash on social media, the draft law was suspended in June 2020. With the suspension said to last until the end of the Covid-19 crisis, Article19 has called for the government to hold a public consultation, with different stakeholders, to “develop a legislative framework for the use of social networks that complies with international standards”, as well as resolve the lack of transparency that has characterised this law until now.

The draft law is reminiscent of the attempt at creating a Numeric Code in 2013. This proposal to “structure” the online space included strict jail terms for a broad range of online content, including content contrary to public order, common decency or undermining Islamic religion.  The draft code was met with public backlash before being overturned, and all copies of the code were entirely removed from the internet by the government.

[1] Original title: “Des sanctions de la protection spéciale de certains droits. De la competence des jurisdictions et des procedures.”

[2] Original provision: “quiconque a publié, diffusé ou transmis, de mauvaise foi, une nouvelle fausse, des allégations, des faits inexacts, des pieces fabriquées ou falsifiées attribuées à des tiers, lorsque ses actes auront troublé l'ordre public ou suscité la frayeur parmi la population et ce, quel que soit le moyen utilisé notamment par discours, cris ou menaces proférés dans les lieux ou reunions publics, par des écrits, des imprimés vendus, distribués, mis en vente ou exposés dans les lieux ou réunions publics”

[3] “De la protection spéciale de certains droits”

[4] “quiconque porte atteinte à la région islamique, au régime monarchique ou incite à porter atteinte à l’intégrité territoriale du Royaume.”

[5] In April 2018, these three companies, some of the most important ones in the country and symbolising “an economy dominated by large groups linked to a business and political elite, or foreign brands”, were targeted by an important boycott campaign calling for the high price of these products to be reduced as Moroccans were facing dire economic hardship. The campaign, called for by civil society organisations on social media, soon became the most popular boycott campaign in the country. Ultimately turning into a broader protest against socio-political injustice in Morocco.

See: “Let it Spoil!” Morocco’s Boycott and the Empowerment of ‘Regular’ Citizen, AlJazeera Centre for Studies, November 2018


Ait Akdim Youssef (2013), Attentats de Casablanca : le 16 mai 2003, un « 11 septembre marocain, Jeune Afrique.

Ait el Haj Rime (2013), Le code numérique avorté!, L’Economiste.

Article19 (2020), Morocco: government must fully withdraw draft law on social media.

APA News (2020), Maroc : Un projet de loi sur l’utilisation des réseaux sociaux suscite l’ire de l’opinion publique

Bouhrara Imane (2020), Projet De Loi 22.20 : Le Gouvernement Tenterait-Il De Nous Faire Porter Des Muselières ?, EcoActu.

L’Economiste (2020), Loi 22.20: le projet de loi reporté jusqu'à la fin de l'urgence sanitaire.

El Khamlichi Yasmine (2020), Projet de loi 22.20 : Quid des droits du consommateur marocain ?, Maroc Diplomatique.

Freedom House (2020), Freedom on the Net: Morocco.

Human Rights Watch (2005), Morocco's Truth Commission: Honoring Past Victims during an Uncertain Present.

Human Rights Watch (2020), Morocco: Crackdown on Social Media Critics.

Iraqi Fahd (2018), Ce jour-là : 16 mai 2003, les attentats de Casablanca, Jeune Afrique.

Maghraoui Abdeslam (2008), Morocco's Reforms after the Casablanca Bombings, Carnegie Endowment.

Le Matin.MA (2020), Le projet de loi sur l'utilisation des réseaux sociaux adopté en Conseil de gouvernement

Oudrhiri Kaouthar (2020), Projet de loi sur l’utilisation des réseaux sociaux, un nouveau boulet pour l’Exécutif ?, TELQUEL.

Perspective Monde, 16 Mai 2003: Attentats terroristes à Casablanca, au Maroc, Sherbrook University, Quebec.

Tech Against Terrorism (2020), The Online Regulation Series: France.

Zaireg Reda (2013), Trois vérités toujours bonnes à rappeler sur le code numérique, TELQUEL.