Spain’s rapprochement with Algeria and the opening of Gibraltar reflect a broader European strategy aimed at securing energy supplies, managing migration routes and reducing regional tensions without undermining the strategic partnership with Morocco.
For decades, Europe’s southern frontier appeared to be defined by immovable dividing lines: the Gibraltar fence, the rivalry between Morocco and Algeria, the unresolved Western Sahara conflict and Europe’s dependence on external energy suppliers. In July 2026, several of those long-standing certainties are beginning to shift at the same time.
Spanish Prime Minister Pedro Sánchez’s official visit to Algeria, scheduled for 20 July, is intended to symbolise the restoration of relations that had come close to breaking point. It also coincides with the provisional implementation of the agreement between the European Union and the United Kingdom on Gibraltar, under which the physical barrier separating the Rock from La Línea de la Concepción is to disappear.
These are not isolated developments. The wars in Ukraine and Iran have once again placed energy security, trade routes and Mediterranean stability among Europe’s foremost strategic concerns. Spain, positioned at the intersection of Europe, North Africa and the Atlantic, is seeking to adapt without sacrificing any of its essential partnerships.
The dispute with Algiers began in March 2022, when the Spanish government endorsed Morocco’s autonomy plan for Western Sahara as the “most serious, realistic and credible” basis for resolving the conflict. Algeria, the principal regional supporter of the Polisario Front and Morocco’s strategic rival, regarded Madrid’s change of position as a betrayal of Spain’s traditional balancing role. It recalled its ambassador, suspended the Treaty of Friendship and imposed restrictions that effectively paralysed much of the bilateral trade relationship.
Foreign Minister José Manuel Albares’s visit to Algiers in March 2026 opened the way towards reconciliation. President Abdelmadjid Tebboune subsequently confirmed the restoration of the Treaty of Friendship, while both governments agreed to revive institutional, economic and energy cooperation. Sánchez’s visit will now be expected to translate that diplomatic thaw into tangible commitments.
Gas supplies explain much of the urgency. Algeria accounted for 35 per cent of the gas entering the Spanish energy system in 2025, regaining its position as Spain’s leading supplier ahead of the United States. Its importance is likely to increase as the European Union gradually eliminates Russian gas imports, with a complete ban on Russian liquefied natural gas expected in early 2027 and restrictions on pipeline gas to follow later that year.
At the western entrance to the Mediterranean, the removal of the Gibraltar fence reflects a different but complementary logic: reducing friction in a region characterised by deep economic interdependence. Around 15,000 people cross the border every day. The new framework is intended to safeguard freedom of movement, establish common customs and fiscal arrangements and require Gibraltar to bring its indirect taxation closer to European standards.
Spain’s sovereignty claim remains unchanged, but it has been separated from the practical management of daily life in the territory. The agreement is not designed to settle three centuries of dispute. Its purpose is to prevent that dispute from continuing to constrain the economy and social fabric of the wider Campo de Gibraltar.
Morocco is watching both developments closely. Spain’s reconciliation with Algeria does not imply a reversal of Madrid’s support for the autonomy plan, but it does require the Spanish government to recover some diplomatic room for manoeuvre between the two North African rivals. At the same time, a more open Gibraltar may generate new trade and logistics flows across the Strait, with potential consequences for ports in southern Spain and for the Tanger Med complex.
Rabat also hopes that greater cooperation between Madrid and Algiers could help curb the irregular migration route from the Algerian coast towards the Balearic Islands and Spain’s Mediterranean shoreline. Yet relying solely on police and security agreements would be insufficient. Migration pressure is also driven by economic hardship, criminal networks and the persistent instability of the Sahel.
Spain is therefore attempting to pursue a diplomacy of balance: a strategic partnership with Morocco, renewed confidence with Algeria and pragmatic cooperation with the United Kingdom over Gibraltar. The risks are clear. Every rapprochement with one actor may arouse suspicion in another.
Europe’s southern frontier is no longer merely a line of containment. It is becoming a strategic space in which energy, migration, trade and security converge. At a time when Europe is seeking to reduce its dependence on Russia and protect itself from further instability in the Middle East, preserving stability across this region is no longer a peripheral concern.




