Energy infrastructure between Morocco and Spain

Beneath the recurring diplomatic spats over migration, territorial disputes, and security cooperation, a quieter yet critical aspect defines the Morocco-Spain relationship: energy dependency. While Rabat asserts its geopolitical claims over Ceuta and Melilla, its energy security remains inextricably linked to Spanish infrastructure.

Gas and electricity flows reveal an asymmetrical interdependence, where Morocco relies heavily on Spanish-controlled systems despite its ambitions to diversify supply. This hidden leverage gives Madrid unexpected influence in bilateral negotiations.

Gas pipelines: from Algerian transit to Spanish-backed supply

The Maghreb-Europe Gas Pipeline (GME) once transported Algerian gas through Morocco to Spain. But after diplomatic relations between Algiers and Rabat collapsed in 2021, the pipeline’s direction reversed.

Now, Spain exports gas to Morocco via the GME, turning a once-strategic transit route into a one-way supply channel. Data from 2025 shows Morocco imported 10.3 TWh of gas—about a quarter of Spain’s total pipeline exports—valued at nearly €400 million.

This shift underscores a paradox: Rabat’s energy security now depends on infrastructures it once used to transit foreign supplies.

Morocco’s push for energy independence

Rabat is not standing idle. Major projects aim to reduce reliance on Spanish networks:

  • Nador West Med LNG terminal – A new floating regasification plant to bypass Spanish pipelines temporarily.
  • Nigeria-Morocco Gas Pipeline – A proposed 7,000 km link from West Africa to Morocco’s energy grid, promising long-term supply diversification.

Yet these initiatives require years of investment. For now, Spain remains Morocco’s primary gas supplier via pipeline, with no immediate alternative.

Electricity interconnections: Spain’s silent dominance

Morocco’s electrical grid is physically tied to Europe through two undersea cables connecting Tarifa to Morocco, with a combined capacity of 1,400 MW.

In 2025, Spain exported a record 3,743 GWh of electricity to Morocco—up 47.5% year-on-year—with nearly 75% of flows moving from Spain to Morocco. This energy bridge supports Morocco’s growing industrial demand and renewable energy expansion.

Madrid and Rabat are even planning a third interconnection cable to further integrate their grids.

Ceuta and Melilla: the energy anomaly

A striking contrast emerges in the Spanish enclaves of Ceuta and Melilla. While Morocco enjoys full access to the European grid via Spain, these territories have historically operated as energy islands.

Ceuta will finally connect to Spain’s mainland grid in 2026 via a €300 million undersea cable, securing its supply. Melilla, however, remains isolated due to geographical constraints.

This disparity highlights a paradox: Morocco’s continental territory is more connected to Europe than parts of Spain itself.

Energy as a geopolitical lever

Energy infrastructure, once seen purely as an economic matter, now carries geopolitical weight. While Spain has no incentive to weaponize gas or electricity flows—such a move would trigger severe diplomatic and economic fallout—the structural dependency creates a vulnerability Rabat cannot ignore.

Madrid’s position is unique: it holds the keys to Morocco’s gas imports via pipeline and serves as the gateway for Moroccan electricity into the European grid. This reality introduces a new dimension to the Morocco-Spain power dynamic, one where energy ties could redefine future negotiations over territory, migration, and security.

For now, Rabat holds strong cards in other areas. But on the energy front, Spain’s infrastructure remains the kingdom’s weakest link—and one of its most powerful bargaining chips.