Morocco-Spain energy ties: Rabat’s unseen vulnerability

Energy flows between Morocco and Spain reveal a strategic imbalance often overshadowed by territorial disputes and migration crises. While Rabat asserts its claims over Ceuta and Melilla, its energy security remains deeply tied to Spanish infrastructure—a paradox that shapes their geopolitical relationship.

Tensions between Morocco and Spain typically center on border disputes, migration control, and economic cooperation. Yet beneath these debates lies an equally critical dependency: energy. The Moroccan kingdom relies entirely on Spanish-controlled pipelines for its natural gas imports and uses electrical interconnections with the Iberian Peninsula as a key element of its grid stability and flexibility.

This interdependence creates a striking paradox. Despite periodic challenges to Spain’s sovereignty over North African territories, Morocco’s energy supply remains inextricably linked to infrastructures operated from Spanish soil.

Reversing the Maghreb-Europe Pipeline

Morocco’s energy vulnerability became more pronounced after the rupture in relations with Algeria in 2021. The breakdown led Algeria to halt transit of its gas through Morocco via the Maghreb-Europe Pipeline (GME), effectively ending the previous flow of Algerian gas to Spain via Moroccan territory.

In response, the direction of the pipeline reversed. Spain began exporting gas to Morocco through the same infrastructure it had once used to receive Algerian supplies. Later, it supplemented this flow with Liquefied Natural Gas (LNG) regasification terminals, ensuring a steady supply to its neighbor.

According to available data, Morocco received approximately 10.3 TWh of gas in 2025, accounting for roughly a quarter of Spain’s total gas exports that year. The financial value of these exports reached nearly €400 million—a figure that underscores the scale of this dependency.

Rabat’s push for energy autonomy

Moroccan authorities are not ignoring this vulnerability. A series of high-profile energy projects reflect a clear strategy to diversify supply routes and reduce reliance on Spanish infrastructure.

The Nador West Med LNG terminal, currently under development, is designed to allow Morocco to import gas directly by sea and inject it into the Maghreb-Europe Pipeline system. This project aims to gradually reduce dependence on Spanish regasification terminals.

Another pillar of this strategy is the proposed Nigeria-Morocco Gas Pipeline, a massive infrastructure project intended to connect West African gas reserves with markets in North Africa and beyond. Though ambitious, such initiatives require significant time and investment before they can alter the regional energy balance.

Until these alternatives come online, Spain remains Morocco’s indispensable energy partner—both as the primary route for piped gas imports and as the gateway linking Morocco’s electrical grid to continental Europe.

Electricity flows: another strategic lever

The energy interdependence extends beyond natural gas. Two submarine cables connect the Spanish and Moroccan electrical grids, with a combined capacity of 1,400 MW.

In 2025, Spanish exports to Morocco via these cables totaled 3,743 GWh, a 47.5% year-on-year increase and the highest level since 2017. Nearly three-quarters of this capacity is used to send electricity from Spain to Morocco—reinforcing the one-way nature of this energy flow.

This connection is more than a commercial arrangement. It provides Morocco with critical grid stability, especially as demand rises and renewable energy capacity expands. Both countries are now discussing a third interconnection to further increase power exchange capabilities.

The Ceuta and Melilla paradox

This energy cooperation highlights another contradiction: while Morocco has been connected to the European grid via Spain for nearly three decades, the Spanish cities of Ceuta and Melilla have long operated as energy islands, disconnected from the mainland Spanish network.

Ceuta is set to break this isolation in 2026 with the completion of a new submarine cable linking it to the Iberian Peninsula. The €300 million project will enhance the city’s energy security. Melilla, however, will remain isolated due to its geographic distance.

The contrast is striking: mainland Morocco is integrated into the European energy system through Spain, while parts of Spanish territory still rely on autonomous power generation.

Energy interdependence and geopolitical leverage

These energy connections have long been viewed primarily through an economic lens. But renewed geopolitical tensions in the Mediterranean and North Africa have given them new strategic significance.

A deliberate interruption of gas or electricity flows between the two countries would carry severe economic, diplomatic, and legal consequences. While Spain has no apparent interest in weaponizing its energy exports, the structural dependency creates a potential lever of influence that neither side can ignore.

Historically, Morocco has held advantages in areas like migration control and counterterrorism cooperation. But energy introduces a new dimension—one where Spain gains unexpected strategic leverage. Morocco’s efforts to reduce this dependency, such as the Nador West Med terminal and the Nigeria-Morocco pipeline, remain years from completion.

For now, Spain remains the indispensable bridge for Moroccan energy imports and the only link connecting Morocco’s electrical grid to Europe. In a context marked by competing claims over Ceuta and Melilla and shifting power dynamics in the Western Mediterranean, this energy reality could redefine the balance of influence between the two kingdoms.

An unseen counterbalance in Morocco-Spain relations

Morocco possesses significant geopolitical levers in its dealings with Spain. Yet the tables turn when it comes to energy. Rabat’s dependence on Spanish infrastructure—especially gas pipelines and electricity interconnections—represents one of the least visible but most consequential constraints in their bilateral relationship.