August 9, 2026
17c64ff1-64e9-4626-81ec-e493578bb6a8
energy infrastructure between Morocco and Spain

Energy, electricity, and critical infrastructure: beneath the recurring tensions between Morocco and Spain lies a less visible dependency. While Rabat asserts its geopolitical ambitions over Ceuta and Melilla, its energy system remains heavily reliant on Spanish infrastructure.

In the ongoing geopolitical tug-of-war between Madrid and Rabat, power dynamics are typically assessed through migration control, security cooperation, the Western Sahara dispute, or Moroccan claims over Ceuta and Melilla. Yet, a far less publicized factor places Spain in a strategic position: energy.

Morocco currently depends entirely on Spanish territory for all its pipeline-imported gas. The kingdom also relies on electrical interconnections with the Iberian Peninsula as a key element of grid stability and flexibility.

This situation creates a paradox in bilateral relations. Despite periodic challenges to Spanish sovereignty over certain territories, Morocco’s energy supply remains partially tied to infrastructures operated or controlled from Spain.

Maghreb-Europe pipeline reversal

Morocco’s energy dependency deepened after the breakdown with Algeria.

In 2021, Algiers decided not to renew the Maghreb-Europe Gas Pipeline (GME) agreement, which previously allowed Algerian gas to transit through Morocco to Spain. The rupture in diplomatic ties between Algiers and Rabat fundamentally altered the pipeline’s function.

The pipeline’s direction reversed entirely.

Following direct imports from Algeria via the Medgaz pipeline and liquefied natural gas (LNG) regasification terminals, Spain began supplying gas to Morocco through the GME.

What was once a system enabling Morocco to benefit from Algerian transit now operates as a channel through which the kingdom indirectly sources gas via Spanish infrastructure.

According to available data, Morocco received approximately 10.3 TWh of gas in 2025, valued at around 400 million euros. This volume represents roughly a quarter of Spain’s gas export capacity for that year.

Rabat’s push to reduce vulnerability

Moroccan authorities are acutely aware of this dependency. The energy projects underway reflect efforts to diversify supply routes.

Nador West Med LNG terminal stands out as a major initiative, designed to enable Morocco to import gas directly by sea and inject it into the Maghreb-Europe pipeline network. The goal is clear: gradually reduce reliance on Spanish terminals.

The Nigeria-Morocco Gas Pipeline project further underscores this strategy. This ambitious infrastructure, intended to connect West African gas reserves to northern markets, could reshape the regional energy balance in the long term.

However, these projects demand significant time and investment. In the short term, Spain remains an indispensable partner for Morocco’s gas supply.

Electricity: a second strategic lever

The interdependency extends beyond gas.

Two undersea cables currently link the Spanish and Moroccan electricity grids, connecting Tarifa with the Moroccan coast. Their combined capacity reaches 1,400 MW.

In 2025, Spain recorded a net export of 3,743 GWh of electricity to Morocco—a 47.5% increase year-on-year and the highest level since 2017, according to transmission system operator data.

The flow overwhelmingly favors Spain: nearly three-quarters of the interconnection’s capacity is used for exports to Morocco.

This connection is more than a commercial relationship—it provides Morocco with additional exchange capacity and grid support as demand rises and the country expands its industrial infrastructure and renewable energy capabilities.

Madrid and Rabat are even considering a third undersea cable to further increase exchange capacity.

Ceuta and Melilla: an energy paradox

This cooperation reveals another contradiction. Despite Morocco’s decades-long connection to the European electricity grid via Spain, the Spanish cities of Ceuta and Melilla have long lacked direct links to the mainland Spanish network.

While Morocco benefits from integration into the European energy system, these cities have historically operated as isolated energy enclaves.

Ceuta is set to break this isolation in 2026 with a new undersea cable linking it to the Spanish mainland. The project, costing around 300 million euros, will enhance supply security.

Melilla, however, will remain disconnected due to its geographical distance.

The contrast is striking: continental Morocco is tied to the European grid through Spain, while parts of Spanish territory still rely on autonomous energy systems.

The geopolitical implications of energy dependency

These infrastructures have long been viewed primarily through an economic lens. Yet, the resurgence of geopolitical tensions in the Mediterranean and North Africa has given them renewed strategic significance.

A dependency does not imply Spain can or would use energy flows as political leverage. A deliberate interruption of gas or electricity supplies would carry significant economic, diplomatic, and legal repercussions.

Nevertheless, this interdependence is not politically neutral. It creates structural vulnerability—and, consequently, potential influence.

While Morocco has often held the upper hand in areas like migration control, security cooperation, counterterrorism, and pressure over Ceuta and Melilla, energy introduces a new dimension—one where Spain gains leverage.

Spain holds strategic cards

Morocco is actively working to reduce its energy dependence on Spain, as evidenced by the Nador West Med LNG project and the Nigeria-Morocco Gas Pipeline.

Yet these alternatives are not yet ready to replace Spanish infrastructure in the short term.

The current reality places Spain in a unique strategic position: it serves as both the main entry point for Moroccan pipeline gas and the gateway connecting Morocco’s electricity grid to the European continental system.

Amid rising tensions over Ceuta and Melilla and intensifying geopolitical competition in the western Mediterranean, this energy reality may become a far more decisive factor in the balance of power between the two kingdoms.

Morocco wields considerable influence over Spain. But the reverse is also true. And in the energy sector, Rabat’s reliance on Spanish infrastructure may be one of the most understated yet critical counterweights in this complex relationship.