Direction générale des études et de la documentation

The General Directorate for Studies and Documentation (Direction Générale des Études et de la Documentation, DGED) is the foreign intelligence agency of Morocco, under authority of the Administration for National Defense. It is officially tasked with maintaining national security and the safety of national institutions.

The current general director of the DGED is Mohammed Yassine Mansouri, who studied with Mohammed VI at the Royal College and previously ran Maghreb Arabe Press. Mansouri was appointed to the position by Mohammed VI on February 14, 2005. The agency collaborates often with its internal counterpart, the DGST.

History
The DGED was created on January 12, 1973 under a Royal Dahir, in the aftermath of two failed coups against Hassan II. It was modeled after the now-defunct French Service de Documentation Extérieure et de Contre-Espionnage. The directorate was run by Ahmed Dlimi until his death in 1983. Dlimi previously ran the CAB-1, a political police unit during the Years of Lead that later became the DGST.

Following Dlimi's death, General Abdelhak El Kadiri headed the DGED until his retirement in 2001. Following El Kadiri's retirement, Ahmed Harchi was appointed as the head of the DGED in July 2001. Mohammed Yassine Mansouri named the general director of the DGED by King Mohammed VI on February 14, 2005, becoming the first civilian to hold the title.

The DGED caused controversy following the 2003 Casablanca bombings for its help in the arrest and conviction of six high-ranking politicians in the Justice and Development Party for complicity in the bombings. A reporter for Al-Manar, a TV station affiliated with Hezbollah was also convicted under the same charges.

In a 2009 interview, Mohammed Yassine Mansouri claimed that the spread of Wahhabism and Shia Islam by Saudi Arabia and Iran as a threat, claiming that both ideologies were aggressive. In the same interview, Mansouri also claimed that Al-Qaeda in the Islamic Maghreb was seen a major threat by Morocco.

In 2014, a Twitter account named @chris_coleman24, which was likely controlled by the French DGSE, leaked documents and emails between Moroccan consulates and the DGED, the user claimed that their goal was to "destabilize Morocco". Arrêt sur Images claimed that some of the documents leaked by the user were falsified. Morocco's Ministry of Foreign Affairs accused "pro-Polisario organizations" with the complicity of the Algerian government of running the Twitter account. Despite this, Algérie Presse Service claims that the user was a "famous American hacker".

In 2017, the French IGPN arrested an officer of the French Border Police for allegedly giving the DGED files on up to 200 people marked under a Fiche S, France's indicator for people deemed a threat to national security. In 2021, the IGPN claimed that members of the DGED had infiltrated the French Council of the Muslim Faith. In 2022, the DGED was caught in a scandal involving its agents infiltrating the European Parliament.

Activities
The DGED states its official mission as "participating in maintaining the security of the kingdom, the state and its institutions". According to a 2003 report by Maroc Hebdo, the DGED has 4,000 employees total, 60% of which are members of the Royal Armed Forces, the remaining being civilians. According to the same report, 5% of DGED employees are women, and there are an estimated 250 to 300 agents abroad working for the DGED. Mohamed Reda Taoujni, previous owner of the journal Assahra Al Ousbouiya, claimed that the DGED controlled his journal and had published articles to the journal and its online counterpart through pseudonyms.

The DGED collaborates with foreign services in security and terrorism-related affairs, including exchange of information regarding specific Moroccans targeted by foreign services.

According to Ali Lmrabet, the DGED was reported to have staff in consulates and embassies of Morocco, hence benefiting from diplomatic immunity. Lmrabet adds that the DGED used journalists working for the Maghreb Arabe Press as agents, and journalists were allegedly tasked with sending wires to the DGED containing information they gathered.