August 9, 2026
17c64ff1-64e9-4626-81ec-e493578bb6a8

Energy supply and critical infrastructure reveal a hidden layer of tension in the often-turbulent relationship between Morocco and Spain. While geopolitical disputes over Ceuta, Melilla, and migration regularly dominate headlines, the energy dependency of Rabat on Madrid remains one of the kingdom’s most overlooked vulnerabilities.

Despite Morocco’s assertive stance on territorial sovereignty, its energy security is inextricably linked to Spanish-controlled infrastructure. The North African nation imports all of its piped natural gas from Spain and relies heavily on cross-border electricity interconnections for grid stability and flexibility.

This paradox underscores a critical asymmetry in the bilateral relationship. While Rabat challenges Madrid’s authority over certain territories, its own energy supply remains dependent on networks operated from Spanish soil.

Reversal of the Maghreb-Europe pipeline

The rupture of the Maghreb-Europe Gas Pipeline (GME) in 2021, following the breakdown in Algeria-Morocco relations, fundamentally reshaped energy flows between the three countries. Previously, the GME carried Algerian gas through Morocco to Spain. Today, it transports Spanish gas back to Morocco, turning a former transit corridor into a supply channel.

According to available data, Morocco received approximately 10.3 TWh of gas via the GME in 2025, amounting to nearly €400 million in value. This volume represents a quarter of Spain’s total gas exports through the system that year.

The shift highlights how geopolitical ruptures can invert long-standing energy dynamics, leaving Rabat exposed to new dependencies while simultaneously reinforcing Madrid’s strategic leverage.

Rabat’s push for energy diversification

Morocco is not oblivious to this vulnerability. The government has launched major initiatives to reduce reliance on Spanish infrastructure, including the Nador West Med LNG terminal, designed to enable direct maritime gas imports and feed into the GME system. Another cornerstone of this strategy is the Nigeria-Morocco Gas Pipeline, a long-term project aimed at connecting West African gas reserves to North African markets.

However, these solutions require substantial investment and time to materialize. Until they come online, Spain remains the primary gateway for Moroccan gas imports and the only bridge linking the kingdom’s electricity grid to the European continental network.

Electricity interconnections: a two-way street

Beyond gas, electricity flows further illustrate the interdependence. Two undersea cables link Spain’s grid to Morocco’s, with a combined capacity of 1,400 MW. In 2025, Spain exported a net total of 3,743 GWh of electricity to Morocco—a 47.5% increase from the previous year and the highest level since 2017.

The exchanges overwhelmingly favor Spain, with nearly three-quarters of the interconnection capacity used for flows from the Iberian Peninsula to Morocco. This arrangement supports Morocco’s growing energy demand and complements its expanding renewable energy infrastructure.

Plans are already underway to add a third undersea cable, which would further intensify energy exchange between the two nations.

The Ceuta and Melilla paradox

Energy ties between Morocco and Spain contrast sharply with the status of the Spanish enclaves of Ceuta and Melilla. Despite Morocco’s integration into the European electricity network via Spain, these cities have long operated as energy islands, disconnected from the Iberian Peninsula.

Ceuta is set to break this isolation in 2026 with a new undersea cable linking it to mainland Spain at a cost of approximately €300 million. Melilla, however, will remain isolated due to its geographical distance from the peninsula.

The disparity underscores a striking reality: while Morocco benefits from a direct connection to Europe’s energy system, parts of Spanish territory still rely on standalone energy networks.

Geopolitical weight of energy interdependence

Energy infrastructure has traditionally been viewed through an economic lens. Yet, amid rising tensions in the Mediterranean and North Africa, these networks have gained geopolitical significance.

While Spain is unlikely to weaponize its energy supply, the structural dependency creates a potential lever of influence. This interdependence introduces a new dimension to the Morocco-Spain dynamic, where Madrid holds strategic cards even as Rabat dominates other negotiation fronts.

Historically, Morocco has leveraged its role in migration control, counterterrorism cooperation, and pressure over Ceuta and Melilla to shape the bilateral agenda. Energy dependency now adds a counterweight, ensuring that Spain’s role in Rabat’s energy security cannot be overlooked.

Madrid’s strategic advantage

Morocco is actively working to reduce its energy dependence on Spain through projects like Nador West Med and the Nigeria-Morocco pipeline. Yet, these alternatives remain years away from providing full coverage.

For now, Spain remains the linchpin of Morocco’s energy security—both as the sole source of piped gas imports and the essential link connecting the kingdom’s electricity grid to Europe. In a context of heightened geopolitical rivalry and territorial disputes, this energy interdependence may well become a decisive factor in the power balance between the two kingdoms.