Insight Image

Between disputes and rapprochement: Latest evolutions and power dynamics in Morocco-Spain relations

19 Apr 2023

Between disputes and rapprochement: Latest evolutions and power dynamics in Morocco-Spain relations

19 Apr 2023

Throughout the past decades, and since the decolonization of Morocco, relations between Rabat and Spain – its former colonizer together with France – have been quite close given the several and multidimensional interests shared by the two countries. Nevertheless, such closeness does not mean that ties between Spain and Morocco have always been easy – on the contrary, common dossiers have often been the ground for tensions and unresolved claims. In particular, the last two years have been quite telling, as Rabat and Madrid have had to deal with tensions over their main bilateral dossiers, namely the status of the Western Sahara and the two enclaves of Ceuta and Melilla under Spanish control in North Africa, as well as issues surrounding migration flows, energy, and territorial waters. For this reason, analysing what has happened over the past two years is key to understanding the power dynamics between the two countries, and how their relationship could further develop in the future.

Diplomatic stand-off between Spain and Morocco

If we had to select a turning point for the sequence of events under our analytical spotlight, this would probably be late April 2021, when Spain acquiesced to the hospitalization of Brahim Ghali, leader of the Polisario Front and President of the Sahrawi Arab Democratic Republic (SADR), due to serious health concerns. The mission of the Polisario Front is the independence of the Western Sahara – that same region that Rabat considers as part of its territory (the so-called “Provinces du Sud”).

As such, Rabat was swift to express its disappointment for an action considered in complete opposition to the spirit of partnership and neighbourliness shared with its Spanish ally; to make matters worse, Madrid had neither consulted nor informed Rabat of its decision to admit Ghali – leader of what Morocco deems to be “separatist militias” – on its territory. Subsequently, Nasser Bourita, Moroccan Minister of Foreign Affairs, summoned the Spanish Ambassador to Rabat, asking him to provide explanations for such a decision.[1] Faced with Morocco’s animosity, Madrid overtly underlined that Ghali’s hospitalization had no political meaning and was motivated by nothing else but humanitarian reasons.[2] Indeed, the decision to carry Ghali from Algerian Tindouf to Spanish Logrono was the result of high-level negotiations between Algiers, the main sponsor of the Polisario, and Madrid.[3]

What is important to highlight here is that this controversy erupted in a pre-existing situation of rupture between Morocco, on one hand, and the Polisario and Algeria on the other. Indeed, the UN-sponsored ceasefire in place between Rabat and the Polisario since 1991 was broken in November 2020, following the escalation of tensions at the Guerguerat border crossing – a land border that links Mauritania with the territory of Western Sahara under Morocco’s control. If, on the one hand, Polisario members resorted to weapons to signal their increasing frustration over the stagnant political process, on the other hand, Rabat’s assertiveness grew remarkably after the US’s recognition of Moroccan sovereignty over the Western Sahara, announced by Donald Trump via a Tweet in December 2020, following the official opening of relations between Morocco and Tel Aviv through the Abraham Accords[4] – both relevant developments that caught Madrid by surprise.[5]

It is in this extremely tense framework that Madrid’s “humanitarian” gesture was read by Rabat, on the one hand, as a sign of its solidarity towards the Polisario and its stance on the Western Sahara – especially if we consider that the Kingdom, after Trump’s declaration, sought to obtain recognition of its sovereignty over the region by its other Western allies[6] – and, on the other, as the willingness to appease Algiers, a major gas exporter, so as to secure Madrid’s energy supply.

Despite Spain’s attempt to contextualize and explain its decision, relations with Morocco rapidly hit rock bottom. In May 2021, over a single day, thousands of migrants[7] poured into Ceuta, an enclave under Spanish control on the Moroccan coast – an exceptional event that allegedly occurred as a result of Morocco loosening its border controls with the autonomous city, which counts around 84.000 inhabitants.[8] According to some sources, rumours that border controls on the Moroccan side were not as strictly enforced as usual encouraged thousands of Moroccans and sub-Saharan Africans – among whom there were hundreds of minors – to cross to Ceuta by swimming or using rudimentary boats.[9] While border crossing attempts frequently occur in Ceuta and Melilla – and despite this allegedly not being the first time that Morocco had relaxed its border controls[10] – what happened in May 2021 has been recorded as the biggest mass border crossing attempt ever witnessed in the enclave.

Spain and Morocco have been partnering to manage migration flows for decades now, and Spain in particular considers Morocco as a key strategic partner in the fight against illegal migration,[11] given that it represents the main point of departure for migrants trying to reach Europe along the so-called Western Mediterranean route. Stemming from this fact, and from the fruitful bilateral cooperation involving joint police operations and patrols, information sharing, management of legal migration pathways,[12] and readmissions, the meaning of Rabat’s move was clear. And it acquired even more relevance given Morocco’s more or less overt role as a bulwark against illegal migration towards the whole of Europe. Indeed, as per the migration and mobility partnership signed with the Kingdom in 2013, the EU and Morocco have been cooperating “to combat the smuggling of migrants and trafficking in human beings.”[13] The protection of borders and the fight against human trafficking was also one of the main foci of the new cooperation programs adopted in 2019.[14] As such, in 2021, the Kingdom represented the EU’s “second largest cooperation portfolio on migration.”[15]

Drawing on this framework, Morocco’s decision was particularly effective in blatantly highlighting its leverage over one of Spain’s – and Europe’s – main obsessions, namely the control of illegal migration. Eloquently enough, one week after the Ceuta crisis, the Moroccan Minister of Foreign Affairs Nasser Bourita declared: “Morocco has no obligation to protect the borders of countries other than its own. Morocco has no vocation to be the gendarme of Europe, nor its concierge. […] Morocco [exercises its role] as a partner. If the foundations of this partnership are not respected, we must ask Spain, a European country, whether it consulted Europe before acting against the interests of this partner.”[16]

The migration crisis in Ceuta – the EU’s only land border with Africa[17]– triggered a staunch reaction by the EU: the European Parliament passed a resolution condemning Morocco’s instrumentalization of migrants, namely unaccompanied minors, as a way to put pressure on Spain in the framework of their diplomatic standoff.[18] EU Commissioner for the European Way of Life, Margaritis Schinas, stressed that the EU cannot accept being “blackmailed” or intimidated”[19] while EU Commissioner for Home Affairs Ylva Johansson underlined the common challenge posed to the EU, stating that “Spanish borders are European borders.”[20] Spain swiftly reacted to what its Minister of Defence Margarita Robles also defined as an act of “blackmail”[21] by deploying its army and some additional police officers to patrol the Moroccan-Spanish North African border, while also pushing back to Morocco most of the migrants – excluding unaccompanied minors – who had illegally entered Ceuta.[22]

Spain’s attempts at normalizing its relationship with Morocco

Despite the incident in Ceuta and the consequent declarations, over the following months Madrid made several attempts to mend relations with the North African country – a sign that the latter indeed has great leverage over the Western European country thanks to its paramount role in countering terrorism and managing migration flows towards Europe. Rabat used this leverage to take things further. The replacement of Spain’s Foreign Minister Arancha Gonzalez Laya in July 2021 within a cabinet reshuffle was not enough to appease the Kingdom, and neither was Madrid’s offer to use its regasification plants to gasify LNG bought by Morocco on the international market before sending it back to the Kingdom via Spain. This occurred after Algeria’s unilateral decision to stop exporting gas to and through Morocco along the Maghreb-Europe pipeline, after having cut diplomatic ties with Rabat in August 2021. Hence, with its decision to lend a helping hand to Morocco, Madrid took the great risk of hampering its relations with Algeria, a key energy supplier for the European country – in 2021, Algeria’s Sonatrach supplied over 40% of Spain’s gas requirements[23] – and all the more so considering that Madrid’s gas supplies to Morocco flow through the Maghreb-Europe pipeline, yet in reverse, from Spain to Morocco.[24] Algiers, thus, threatened to halt its supplies to Madrid should Algerian gas be diverted to destinations other than the ones already stated in the bilateral contracts[25] – which, needless to say, referred to the possibility that Spain provided Morocco with gas coming from Algeria.

Despite these attempts at rapprochement, the move that really changed matters on the ground and eventually normalized relations between Spain and Morocco – and that altogether created additional tensions with Algeria – was the change in Madrid’s position on the Western Sahara issue, after decades of official neutrality in the conflict between Morocco and the Polisario.[26] According to what Spanish Prime Minister Pedro Sanchez wrote to Moroccan King Mohammed VI in a letter, which was apparently meant to be private (at least until Sanchez’s next visit to Rabat),[27] Morocco’s 2007 proposal to grant autonomy to the Sahrawis within a Western Sahara under Moroccan rule represents “the most serious, credible, and realistic basis”[28] on which to solve the ongoing conflict. Many have pointed out how Spain’s new standpoint has much more to do with the contextual will to normalize relations with Morocco rather than with Western Sahara itself;[29] notwithstanding its instrumental character, it was enough to shift power balances within the conflict and with neighbouring Algeria.

Immediate consequences of Morocco-Spain rapprochement

Spain’s support for Morocco’s autonomy plan for the Western Sahara added up to the above-mentioned events and – the much more radical – US recognition of Moroccan sovereignty over the region, which has not been reversed by the Biden administration. Germany also recently acknowledged the autonomy plan as an “important contribution” to the resolution of the conflict,[30] following a diplomatic standoff between Berlin and Rabat caused, among other things, by Germany’s criticism of the  US’s full support for Morocco’s position on the Western Sahara. Furthermore, Spain’s declaration, which made Madrid the strongest European supporter of Morocco’s autonomy plan,[31] acquired even more relevance as it came from the former colonizing power, which until 1975 had held control of the same territories that Rabat now mostly administers.

As could have been expected, Algeria, the main sponsor of the Polisario, strongly condemned Spain’s “unjustifiable turnaround”[32] on the Western Sahara and, as a direct consequence, suspended its two-decades-old friendship treaty with Spain, which would affect economic and trade relations between the two countries. A major concern was that energy exports – one of the main areas, if not most important dossier of cooperation between Madrid and Algiers – would also be impacted, especially given that Algerian gas supply to Spain had already been partly hit by the closure of the Maghreb-Europe gas pipeline in late 2021. Nevertheless, Algerian gas exports to Spain along the Medgaz pipeline carried on, though at a much slower pace in 2022 compared with 2021. In January 2023, however, Algeria regained its place as Spain’s main supplier of gas.[33] Moreover, based on the terms of the bilateral contract, the price was revised upwards following market trends – and will be further reviewed this year.[34]

On the other hand, Morocco obviously welcomed the end of Spain’s neutrality over Western Sahara, and highlighted this new phase in bilateral relations by sending back its ambassador to Madrid after ten months of absence. Paradoxically enough, while the Moroccan ambassador Karima Benyaich regained her post in Madrid, Algeria recalled its own ambassador to Spain for consultation.[35] The rapprochement between Spain and Morocco was also underlined by the visit of Spanish PM Pedro Sanchez to Rabat in April 2022, where the leaders of the two countries expressed their will to cooperate in an environment of respect, mutual trust, and transparency. The first output of this new phase of strengthened bilateral relations was an agreement on security cooperation – drafted back in 2019 and put into force on April 30 2022 – which aims, inter alia, to address human trafficking and “illegal migration” in the struggle against international crime. As such, several NGOs have defined the agreement as an example of dealing with migration from the sole standpoint of securitisation.[36]

Following the incident in the enclave of Melilla in June 2022, when around 2,000 migrants tried to cross the Moroccan border into the territory, resulting in the deaths of at least 23 migrants due to a stampede and violence by border police corps, protests erupted across Spain, with civil society and government opposition – very critical of Sanchez’s new positioning on the Western Sahara and all its ripple effects – condemning the deaths of the migrants and demanding a full investigation into the tragedy. Despite reports from media[37] and NGOs[38] that both Spain and Morocco’s border police contributed to the deaths of the migrants at the Melilla border, in December 2022 Spain’s public prosecutor absolved Spain’s border police from any involvement and closed the investigation.[39] Yet, it is important to highlight that after this incident, the EU and Morocco agreed to renew their cooperation on migration and border control, with a focus on anti-trafficking. The reinforcement of the EU-Morocco partnership on migration, which was discussed between European Union Commissioner for Home Affairs Ylva Johansson, Spain’s Home Affairs Minister and Morocco’s Minister of Interior, includes providing support for border management, strengthening police cooperation, and increased cooperation with EU agencies.[40]

In other words, it seems that Morocco will keep on playing the role of bulwark within the framework of Europe’s counter-migration strategies, especially with Spanish government figures showing that the number of migrants who reached the Canary Islands in April 2022 was 70% lower than in February 2022 (when relations with Spain had not yet been mended).[41]

Future scenarios of the relations between Morocco and Spain (and the EU)

Broadening the scope of our analysis beyond the immediate consequence of this rapprochement – which was confirmed by the Morocco-Spain High Level Meeting held in Rabat in February 2023 for the first time after 2015, and which according to Sanchez consolidated a new stage in  bilateral relations[42] – there is concern that Rabat’s assertive foreign policy might prospectively be galvanized rather than appeased by Spain’s approach. Indeed, Morocco now has a clear record of how it can leverage a key dossier such as migration to obtain concessions from one of its European allies – or potentially from the whole EU. After all, there are, both with Spain and with the EU, some dossiers where Rabat holds open claims – more or less vocally, depending on the political situation at stake.

Starting from Spain, the status of Ceuta and Melilla stands as an unresolved file between the two countries. Indeed, Morocco has never accepted Spanish sovereignty over the two enclaves in North Africa, which it considers as occupied territories that still have to undergo a process of decolonization; hence, their status represents a possible trigger for further standoffs between Morocco and Spain. Following closures due to the COVID-19 pandemic, the borders between Morocco and the two enclaves were only re-opened in May 2022, after the bilateral rapprochement. The border closures had serious socio-economic consequences for the communities living on both sides. Just before the pandemic, Rabat had been trying to limit the smuggling activities on its borders, which represented one of the main – if not the main – basket of revenues for the two enclaves and the bordering Moroccan areas, but which also constituted a consistent loss of revenue for the Moroccan treasury. This measure was interpreted by some observers as an attempt to “asphyxiate” the two enclaves to lure Spain into leaving them to Morocco.[43]

Despite the much more cooperative posture adopted by Morocco after the end of Spain’s neutrality over the Western Sahara – both parties announced in February 2023 that the Melilla customs office was reopened and that another one was established in Ceuta[44] – Morocco has not shied away from comments hinting at its position on the status of the two enclaves. As such, it is important to point out that Morocco does not appear to have swapped Spanish support on the Moroccan autonomy plan for Western Sahara for an end to its long-standing claims on Ceuta and Melilla.[45] On the other hand, Spain is firmly holding the line on its control over the two enclaves – so much so that it recently asked the NATO Secretary General to include them in the organization’s field of action.[46]

Another open issue that might trigger new disputes concerns the delimitation of territorial waters. After having declared its sovereignty over the territorial waters and the Exclusive Economic Zone (EEZ) off the coast of the Western Sahara, in 2020 Rabat also started to claim the right to exploit the related continental shelf, which would overlap with the continental shelf claimed by the Spanish Canary Islands.[47] In this regard, the roadmap that emerged from the rapprochement between Rabat and Madrid initially entailed the relaunch, after 15 years, of the Spanish-Moroccan working group for the delimitation of the Atlantic waters.[48] Nevertheless, in October 2022, Rabat decided to indefinitely postpone the delimitation of its maritime borders with the Canary Islands – a move that might underline Morocco’s positive engagement in the new relational phase between the two countries. Despite this, while welcoming the news, representatives from both the Spanish and Canary governments expressed the need to remain vigilant on this dossier, in the interests of Spain and of the archipelago.[49]

For what concerns the EU as a whole, both in 2016 and 2021, the rulings of the European Court of Justice asserted the exclusion of the Western Sahara from the agricultural and fisheries agreement between Morocco and the EU, as advocated for by the Polisario. So far, EU institutions have appealed the rulings,[50] showing a willingness to de facto perpetuate the economic (and political) status quo with Morocco; nevertheless, this strategy might be a mere way to “delay the inevitable”[51] – that is, the correct implementation of EU laws – which would likely lay the ground for a serious controversy with Rabat. Indeed, in his speech for the 46th anniversary of the Green March in 2021, King Mohammed VI declared that “Morocco will not engage in any economic or commercial process that would exclude the Moroccan Sahara.”[52]

In such a complex and delicate framework, it would be key for Europe to leverage its own strengths in the relationship with Rabat, namely for what concerns trade and future economic perspectives, in order to rebalance relations between Morocco and Spain as well as relations between Morocco and the EU. After all, in absolute terms and beyond ideological standpoints, Morocco has a much more immediate interest in the successful continuation of its trade relations with Europe than the other way around: suffice to say that the EU is Morocco’s largest trade partner, and that the Kingdom largely benefits from its Association Agreement with the EU. What is more, Morocco’s ambitions in the domain of green energy do involve Europe as a buyer for both solar and wind energy as well as for green hydrogen, a market which the Kingdom aims at developing.

Hence, it is in the interests of all parties to pursue relations in a cooperative environment. To do so, it would help if Europe and its member countries abandoned their panic-stricken approach to migration.


[1] Kingdom of Morocco Ministry of Foreign Affairs, African Cooperation, and Moroccan Expatriates, “Le Maroc déplore l’attitude de l’espagne et exprime sa déception devant un acte contraire à l’esprit de partenariat et de bon voisinage,” [French] April 25, 2021,

[2] Anass Machloukh, “Après l’hospitalisation de Brahim Ghali, l’Espagne tente de rassurer le Maroc,” L’Opinion [French], April 24, 2021,

[3] “Algérie-Maroc: le président de la RASD Brahim Ghali hospitalisé d’urgence en Espagne,” Jeune Afrique [French], April 22, 2021,

[4] Andrew Lebovich, “Crisis to Watch: Western Sahara,” Italian Institute for international Political Studies, December 22, 2021,

[5] Mehdi Mahmoud, “Affaire Ghali: ‘El Paìs’ publie des nouvelles révèlations sur le séjour espagnole du chef du Polisario,” Jeune Afrique [French], May 11, 2021,

[6] “Le Maroc met la pression sur l’Espagne suite à l’hospitalisation secrète du chef du Polisario sur son sol,” La Tribune Afrique [French], April 25, 2021,

[7] Different sources mention different numbers. Some sources report 10,000.

[8] Ashifa Kassam, “Spanish PM Vows to ‘Restore Order’ after 8,000 Migrants Reach Ceuta,” The Guardian, May 18, 2021,

[9] Marìa Martin, “How Did the Migrant Crisis in Spain’s City of Ceuta Occur and What Is Going to Happen Now?” El Paìs, May 19, 2022,

[10] Sam Edwards, “Morocco Uses Migrants to Get What It Wants,” Politico, May 19, 2021,

[11] “Reprise de la coopération entre le Maroc et l’Espagne,” L’Orient Le Jour [French], May 10, 2021,

[12] “Migrations: la coopération maroco-espagnole, ‘un exemple à suivre’ (Secrétaire d’Etat espagnol),” Map News [French], May 6, 2022,

[13] European Commission, “Migration and Mobility Partnership Signed between the EU and Morocco,” June 7, 2013,

[14] European Commission, “The EU Is Boosting Its Support to Morocco with New Programmes Worth €389 Million,” December 20, 2019,

[15] European Union, EU Support on Migration in Morocco, EU Emergency Trust Fund for Africa, May 2021,

[16] M. L., “Ceuta: ‘Le Maroc n’a pas vocation à être le gendarme de l’Europe’, réagit son ministre des Affaires étrangères,” TF1 Info {French – Translation by the Author], May 24, 2021,

[17] “Ceuta: Europe ‘Will Not Be Intimidated’ on Issue of Migration, Says EU,” Euronews, May 18, 2021,

[18] Umberto Profazio, “Morocco–Europe Relations Reach an Inflection Point,” International Institute for Strategic Studies (IISS), September 6, 2021,

[19] Euronews, “Ceuta: Europe ‘Will Not Be Intimidated’.”

[20] Kassam, “Spanish PM Vows to ‘Restore Order’.”

[21] “Spain Accuses Morocco of ‘Blackmail’ Over Ceuta Migrant Surge,” US News, May 20, 2021,

[22] Kassam, “Spanish PM Vows to ‘Restore Order’.”

[23] “Spain Has Started to Transport Gas to Morocco,” Energy News, June 29, 2022,

[24] “Spain Decision to Supply Gas to Morocco Deals Double Blow to Algeria,” The Arab Weekly, February 4, 2022,

[25] Stuart Eliott, “Algeria Threatens to Terminate Spanish Gas Supply Contracts over Morocco Flow,” S&P Global, April 28, 2022,

[26] Marcos Bartolomé, “Why Is Madrid Pandering to Morocco?” Foreign Policy, May 13, 2022,

[27] Andrew Lebovich and Hugh Lovatt, “Endless Concessions: Spain’s Tilt to Morocco,” European Council on Foreign Relations (ECFR), May 23, 2022,

[28] The letter can be read at:

[29] Lebovich and Lovatt, “Endless Concessions.”

[30] German Federal Foreign Office, “Germany and Morocco: Bilateral Relations,” August 24, 2022,

[31] Lebovich and Lovatt, “Endless Concessions.”

[32] “Algeria Ends 2-Decade Friendship Treaty with Spain,” Le Monde, June 9, 2022,

[33] “Algeria Is Main Supplier of Energy to Spain Despite Western Sahara Tensions,” Asharq Al-Awsat, March 11, 2023,

[34] Juan Peña, “Spain and Algeria Seal Their New Gas Supply Prices,” Atalayar, October 10, 2022,

[35] “Après 10 mois d’absence, l’ambassadrice Karima Benyaich de retour à Madrid,” Le Desk {French], March 20, 2022,

[36] “Spain and Morocco Renew Security Cooperation Agreement Linking Organised Crime and ‘Irregular’ Immigration,” State Watch, April 28, 2022,

[37] “Morts de dizaines de migrants à Melilla: ce qu’il s’est vraiment passé à la frontière entre l’Espagne et le Maroc,” Le Monde [French], November 29, 2022,

[38] Amnesty International, “They Beat Him in the Head, to Check If He Was Dead”: Evidence of Crimes under International Law by Morocco and Spain at the Melilla Border (London: Amnesty International, 2022),

[39] “Spain Absolves Border Agents over Melilla Asylum Seeker Deaths,” Al-Jazeera, December 23, 2022,

[40] European Commission, “European Commission and Morocco Launch Renewed Partnership on Migration and Tackling Human Smuggling Networks,” July 8, 2022,

[41] Marion Macgregor, “Migrants Storm Spanish Border Fence in Morocco,” Info Migrants, June 24, 2022,

[42] “Sánchez: The High-Level Meeting between Spain and Morocco Consolidates the New Stage of Bilateral Relations,” La Moncloa, February 2, 2023,

[43] Nina Kozlowski, “À Ceuta et Melilla, nouveau bras de fer entre le Maroc et l’Espagne,” Jeune Afrique [French], February 17, 2021,

[44] Marina Leiva, “Why Do Ceuta and Melilla Matter to Spain and Morocco?” Investment Monitor, October 27, 2022,; Government of Spain, “Spain and Morocco Open New Goods Crossings through Customs Posts in Ceuta and Melilla,” February 24, 2023,

[45] Marina Leiva, “Why Do Ceuta and Melilla Matter to Spain and Morocco?”.

[46] Soufiane Kabbachi, “Algérie, Maroc, Sahara, gaz… La crise régionale vue d’Espagne,” Jeune Afrique [French], July 6, 2022,

[47] Juan Peña, “Morocco Obtains a Seat on the Commission on the Limits of the Continental Shelf Which Studies the Limits of the Canary Islands’ Waters,” Atalayar, June 16, 2022,

[48] Juan Peña, “Le gouvernement espagnol prépare les négociations avec le Maroc sur les eaux des îles Canaries,” Atalayar [French], June 27, 2022,

[49] Raùl Redondo, “Le Maroc et son geste de reporter sans date la délimitation des frontières maritimes avec les îles Canaries,” Atalayar [French], October 27, 2022,; “Le Maroc reporte ‘sine die’ la délimitation des frontières maritimes avec les îles Canaries,” Bladi [French], October 2, 2022,

[50] Riccardo Fabiani, “How EU Should Use Economic Influence on Western Sahara,” EU Observer, January 3, 2022,

[51] Hugh Lovatt, “Western Sahara, Morocco, and the EU: How Good Law Makes Good Politics,” European Council on Foreign Relations (ECFR), September 30, 2021,

[52] “Mohammed VI: ‘Le Maroc n’engagera aucun démarche d’ordre économique ou commercial qui exclura le Sahara marocain’,” Telquel [French – Translation by the author], November 6, 2021,

Related Topics