From Medieval Mobility to Migration Diplomacy: The History of Migration between Morocco and Spain, 711–2026

Part I — Historical Foundations
Cross-Mediterranean Mobility, Colonialism, and the Postcolonial Relationship
Situated at the intersection of Europe and Africa, the Middle East, and the Atlantic world, the Strait of Gibraltar constitutes the centre of these linkages; on a good day one can see the Spanish coast from Tangier and vice-versa. The history of migration between Morocco and Spain reflects the changing political, economic, and social relationships between the two shores of the Strait of Gibraltar. For centuries, this geographical passage connected populations through conquest, commerce, religious exchange, displacement, and labor mobility. However, the meaning and regulation of migration changed substantially as political authorities, territorial boundaries, and legal systems evolved. De Haas says; “migration seems to be the result of development rather than the lack of development.” Understanding contemporary migration diplomacy therefore requires a historical approach that distinguishes medieval mobility from colonial population movements and modern international migration.
This article argues that Moroccan–Spanish migration relations developed through three major transformations: the establishment of historical connections across the Strait of Gibraltar, the reorganization of mobility under colonial rule, and the emergence of formal migration agreements within a postcolonial and increasingly Europeanized diplomatic framework. By examining these transformations, the article explains how migration became both a practical policy concern and an important dimension of bilateral relations. Developed within the framework of activities organized in collaboration between the Legal Clinic of Migration at University Mohammed I, Oujda, and the High Atlas Foundation, this study seeks to connect historical perspectives on mobility with contemporary legal and developmental frameworks.
1. Medieval mobility and historical connections, 711–1767
The conquest of much of the Iberian Peninsula by forces crossing from North Africa in 711 initiated a prolonged period of political, cultural, and demographic interaction between the Maghreb and al-Andalus. Movement across the Strait of Gibraltar involved military expeditions, settlement, trade, scholarship, and diplomatic exchange. These connections contributed to the formation of networks that linked cities and communities on both sides of the Mediterranean.
The expansion of Christian kingdoms in Iberia subsequently transformed these relationships. The fall of Granada in 1492, the expulsion of Jewish communities from Spain that year, and the expulsion of the Moriscos between 1609 and 1614 generated significant population movements toward North Africa. Moroccan cities, particularly Tetouan and Chefchaouen, became associated with Andalusian settlement and the preservation of cultural and commercial traditions originating in Iberia.
These movements are relevant to migration history because they demonstrate the longstanding relationship between political change and population displacement. Nevertheless, they should not be equated with contemporary migration. Medieval political authorities did not operate within the modern international system of national citizenship, immigration legislation, and internationally standardized border controls. The period is therefore best understood as the historical background to later migration relations rather than as the beginning of a continuous modern migration regime.
2. Treaty diplomacy and colonial expansion, 1767–1956
During the eighteenth and nineteenth centuries, relations between Morocco and Spain increasingly developed through formal diplomatic agreements concerning commerce, maritime relations, security, and territorial interests. The Treaty of Peace and Commerce signed on 28 May 1767 represents an important documentary starting point for examining this diplomatic relationship. The original Spanish-Arabic document is preserved in Spain's Archivo Histórico Nacional under reference ESTADO, 3372, Exp.11.

Figure 1: The Treaty of Wad Ras as portrayed by Joaquin Dominguez Becquer.
The treaty should not be described as a modern migration agreement. Its historical importance lies in its contribution to the formal regulation of relations between the two states. Subsequent conflicts and agreements, particularly the Spanish-Moroccan War of 1859–1860 and the Treaty of Wad Ras of 1860, further transformed the relationship amid expanding European imperial competition.
A decisive institutional change occurred in 1912, when Morocco was divided into French and Spanish protectorate zones. The Spanish Protectorate created administrative structures through which colonial authorities exercised political, military, and economic influence over northern Morocco. These structures affected labor recruitment, residence, military service, and movement between metropolitan Spain and the Protectorate.

Figure 2 : Moment of the signing of the Treaty by which the Spanish Protectorate was created, 27 November, 1912.
Colonial mobility, however, must be interpreted within its specific legal context. The Spanish zone was not legally identical to metropolitan Spain, and the movement of Moroccan workers, soldiers, officials, and merchants cannot automatically be classified according to contemporary immigration categories. Colonial rule nevertheless established territorial and administrative arrangements whose historical consequences persisted after Moroccan independence.
Morocco regained independence in 1956, fundamentally changing the legal basis of its relationship with Spain. Migration relations now developed between two formally sovereign states, although territorial disputes, colonial memories, and economic inequalities continued to influence bilateral diplomacy.
3. Independence and the emergence of modern migration relations, 1956–1985
Following independence, Moroccan migration developed within wider European labor markets. France remained a particularly important destination for Moroccan workers, while other Western European countries also attracted migrants. Spain's transformation from a country of substantial emigration into an increasingly important destination for foreign workers occurred gradually.
During this period, Moroccan–Spanish relations were influenced by consular affairs, labor mobility, economic change, and unresolved territorial questions involving Ceuta and Melilla. These issues would become increasingly significant as Spain integrated into European institutions and migration became more closely associated with border security and immigration legislation.
The postcolonial period therefore established the political conditions for the institutionalization of migration cooperation. Unlike earlier forms of mobility governed primarily through commercial, colonial, or local arrangements, contemporary migration increasingly required formal procedures addressing admission, employment, residence, and return.
Part II — The Institutionalization of Migration Diplomacy
Bilateral Agreements, Europeanization, and Contemporary Cooperation, 1986–2026
4. European integration and the regulation of migration, 1986–2000

Figure 3: Signing of the Accession Treaty of Spain (1985) / Photo: European Commission
Spain's accession to the European Communities in 1986 transformed the institutional context of its relationship with Morocco. European integration, the development of the Schengen framework, and the introduction of visa requirements for Moroccan nationals around 1991 progressively changed the conditions governing entry into Spain. Migration became increasingly connected to external border management, immigration legislation, and cooperation with countries outside the European Community.
The 1992 Spanish-Moroccan readmission agreement represents a major turning point. Signed on 13 February 1992, the agreement established procedures for readmission and transit, alongside mechanisms for cooperation between the two countries' authorities. Its preamble refers to “los lazos históricos que unen a los dos pueblos” (“the historical ties that unite the two peoples”), linking migration cooperation to the broader bilateral relationship.
The agreement addressed the readmission of third-country nationals who had entered one state's territory illegally from the other state's territory, subject to the conditions established in the text. It also provided for transit arrangements, administrative cooperation, and a joint committee to address implementation issues. Article 13 referred to cooperation in organizing migration flows while always guaranteeing the social rights of the workers concerned.
The agreement must be understood within its precise legal chronology. Although it was provisionally applied from the date of signature, its formal entry into force was recorded on 21 October 2012. This distinction raises important questions about the relationship between provisional application, diplomatic negotiations, and formal legal effectiveness.
The agreement illustrates the emergence of a more institutionalized approach to migration diplomacy. It established procedures for cooperation, but its existence did not eliminate questions concerning implementation, migrants' rights, or the relationship between bilateral arrangements and European law.
5. Labor migration and the 2001 agreement
The development of migration diplomacy extended beyond readmission. On 25 July 2001, Spain and Morocco signed an agreement on manpower intended to regulate labor mobility between the two countries. Its preamble expressed the parties desire to regulate labor flows in an orderly and coordinated manner.
The agreement established procedures for recruitment, selection, employment contracts, and the participation of the competent authorities. It also addressed seasonal employment and the conditions under which workers could return to Morocco following their employment in Spain.
This framework reveals an important dimension of the bilateral relationship: the simultaneous regulation of irregular migration and facilitation of authorized labor mobility. Whereas the 1992 agreement primarily addressed readmission, transit, and border cooperation, the 2001 agreement provided a framework for organized employment.
These instruments should not be treated as interchangeable. Their coexistence demonstrates that migration policy includes different objectives, including border enforcement, labor-market management, and the regulation of temporary mobility.
The effectiveness of the labor agreement must be assessed through evidence concerning recruitment, employment conditions, wages, return, and implementation by the two administrations. Formal provisions alone cannot establish whether the intended benefits were consistently realized.
6. Migration cooperation, territorial disputes, and human rights, 2002–2021
During the early twenty-first century, migration became increasingly connected to border-management practices and diplomatic tensions. The 2002 Perejil Island crisis, the events at Ceuta and Melilla in 2005, and subsequent border incidents illustrated the continuing significance of territorial sovereignty in Moroccan–Spanish relations.
Despite these disagreements, the two governments continued to develop mechanisms for migration cooperation. The agreement concerning unaccompanied minors, signed on 6 March 2007 and entering into force in 2012, addressed prevention, protection, and the possible return of minors. Its reference to the Convention on the Rights of the Child underscores the importance of interpreting migration cooperation alongside international protection obligations.
The relationship between cooperation and human rights became particularly controversial in connection with returns at Ceuta and Melilla. Research by Inmaculada González García examines the return of migrants from Isla de Tierra in 2012 and summary returns associated with Ceuta and Melilla in 2014. These cases demonstrate why diplomatic cooperation must be distinguished from the legality of individual enforcement practices.
A bilateral agreement does not automatically make every return lawful. Decisions concerning removal must remain consistent with applicable legal safeguards, including those relating to international protection and the prohibition of refoulment where relevant.
The May 2021 Ceuta crisis further demonstrated the vulnerability of migration cooperation to wider diplomatic tensions. The episode occurred amid disagreements involving Moroccan Sahara and the presence of Brahim Ghali in Spain. Nevertheless, the relationship between those disputes and the movements of people must be established through documentary evidence rather than inferred solely from their temporal coincidence.
7. Strategic rapprochement and contemporary migration diplomacy, 2022–2026
A new phase of bilateral relations emerged with the joint declaration adopted on 7 April 2022. The declaration stated, “Cooperation in the area of migration will be reactivated and strengthened” and provided for renewed institutional dialogue.
This commitment situated migration within a broader political framework. The declaration also addressed economic cooperation and bilateral consultation, indicating that migration was treated as one component of the relationship rather than an isolated administrative issue.
The twelfth Spain–Morocco High-Level Meeting, held in Rabat in February 2023, continued this process. Cooperation concerning migration and development, including initiatives supporting circular migration, formed part of the bilateral agenda.
The thirteenth High-Level Meeting took place in Madrid on 4 December 2025. Its joint declaration provides an important primary source for examining the continuity of political dialogue established in 2022. However, the adoption of a joint declaration should not automatically be interpreted as the creation of a new binding migration treaty; the legal status of each commitment must be assessed individually.
Labor mobility remains an important dimension of contemporary Spanish–Moroccan cooperation. According to figures published by Spain’s Ministry of Inclusion, Social Security and Migration on 29 December 2025, a total of 25,767 migrant workers participated in the Gestión Colectiva de Contrataciones en Origen (GECCO) programmes during 2025, with Moroccan nationals accounting for 81 percent of recruitment. These figures demonstrate Morocco’s central role in Spain’s organized seasonal labour-recruitment system. Nevertheless, they should not be interpreted as representing the total Moroccan migrant population in Spain, nor as a direct measure of the implementation of the bilateral manpower agreement signed on 25 July 2001. GECCO, established in 2000, constitutes a distinct administrative framework for collective recruitment at origin, and its annual results must therefore be distinguished from the implementation of specific bilateral agreements.
As of 28 September 2026, the documented framework of Spanish–Moroccan migration cooperation encompasses labour recruitment, circular migration, readmission, border management, and high-level political dialogue. The approval of Spain’s GECCO framework for 2026 further illustrates the continuing institutionalization of organized labour mobility. However, assessing the effectiveness of this framework requires more than identifying agreements and reporting recruitment figures: it also requires examining implementation, workers’ rights, the continuity of circular migration, and the relationship between bilateral commitments and domestic migration law. Any account extending beyond 28 September 2026 should verify subsequent diplomatic developments, new legal instruments, and the latest available official statistical data..
The history of migration between Morocco and Spain demonstrates that mobility has long been intertwined with political authority, economic relations, and territorial change. From medieval connections across the Strait of Gibraltar to colonial administration and contemporary migration agreements, the relationship has undergone profound institutional transformations.
The principal change has been the progressive formalization of migration governance. The 1992 readmission agreement established mechanisms for controlling irregular entry and coordinating administrative action, while the 2001 manpower agreement created a framework for organized labor mobility. The 2007 agreement concerning unaccompanied minors further demonstrated the diversification of bilateral cooperation.
European integration added another dimension by connecting Spanish migration policy to wider European border and migration frameworks. Meanwhile, the 2022 joint declaration and subsequent high-level meetings illustrated the continuing importance of migration within the broader Moroccan–Spanish diplomatic relationship.
Ultimately, migration diplomacy between the two countries cannot be understood exclusively as border enforcement or as a continuous historical process. It is better understood as an evolving system in which states negotiate mobility, labor needs, sovereignty, security, and international obligations. Its future development will depend not only on diplomatic cooperation but also on the implementation of agreements and the protection of migrants rights.