The geopolitical chessboard between Morocco and Spain extends far beyond territorial disputes or migration tensions. At the core of their complex relationship lies a less visible but critical vulnerability: energy. While Rabat asserts its claims over Ceuta and Melilla, the Moroccan energy grid remains inextricably linked to Spanish infrastructure—a dependency that redefines power dynamics in the region.
Rabat’s ambitions often overshadow another reality: Morocco relies entirely on Spanish-controlled pipelines for its current natural gas imports. Additionally, the kingdom depends on electrical interconnections with the Iberian Peninsula to stabilize its grid, ensuring both security and flexibility for its growing energy needs. This paradox underscores a strategic imbalance where Morocco’s geopolitical posturing clashes with its operational dependence on its neighbor.
From transit hub to reverse flow: the Maghreb-Europe pipeline reversal
The turning point came in 2021, when Algeria severed its gas supply agreement via the Maghreb-Europe pipeline (GME), a critical artery that once carried Algerian gas through Morocco to Spain. The diplomatic rupture between Algiers and Rabat not only disrupted regional energy flows but also forced a complete reversal of the pipeline’s direction. No longer a transit route for Moroccan-bound gas, the GME became a conduit for Spanish gas exports to Morocco.
In 2025, data reveals that Morocco received approximately 10.3 TWh of gas through this system, valued at nearly €400 million. This volume accounted for roughly a quarter of Spain’s total gas exports that year, illustrating how deeply Rabat’s energy security now hinges on Spanish infrastructure.
Rabbat’s long-term strategy to break free from Spanish dominance
Morocco is not oblivious to this vulnerability. A series of ambitious energy projects aim to reduce its reliance on Spanish networks. Among them, the Nador West Med LNG terminal stands out as a cornerstone of this strategy. Once operational, it will allow Morocco to import liquefied natural gas directly via maritime routes and integrate it into the Maghreb-Europe pipeline network—effectively bypassing Spanish intermediaries.
The proposed Nigeria-Morocco gas pipeline represents another bold step toward energy diversification. This mega-project, designed to connect West African gas reserves with northern markets, could reshape the regional energy landscape. However, such initiatives require massive investments and years to materialize. Until then, Spain remains an indispensable partner for Morocco’s energy supply.
Electricity flows: Madrid’s silent leverage over Rabat
The energy interdependence extends beyond gas. Two undersea cables link the Spanish and Moroccan electrical grids, 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% surge from the previous year and the highest level since 2017. Notably, nearly three-quarters of this capacity flows from Spain to Morocco, underscoring the directional advantage Madrid holds.
This connection serves a dual purpose. For Morocco, it provides a critical backup to its national grid, especially as industrial expansion and renewable energy projects strain existing capacity. For Spain, it reinforces its role as a regional energy hub. Plans for a third undersea cable are already underway, promising to further deepen this electrical interdependence.
The Ceuta and Melilla paradox: energy cooperation amid territorial disputes
This interconnectedness reveals a striking contrast. While Morocco benefits from direct access to the European energy grid via Spain, the Spanish enclaves of Ceuta and Melilla have historically existed as isolated energy islands. Ceuta is set to break this pattern in 2026 with the completion of a €300 million undersea cable linking it to the Iberian Peninsula, significantly enhancing its energy security. Melilla, however, remains cut off due to its geographical distance.
This asymmetry highlights a paradox: Morocco’s continental territory is more integrated into Europe’s energy system than parts of Spain itself. It’s a subtle yet powerful illustration of how energy flows can transcend geopolitical tensions.
Energy as a new front in Morocco-Spain relations
Traditionally viewed through the lenses of migration, security cooperation, or territorial claims, the Morocco-Spain relationship now faces a new dimension: energy infrastructure. While Spain holds no apparent intention to weaponize these flows, the structural dependency creates a latent vulnerability that could influence future negotiations.
Madrid’s energy leverage is undeniable. Not only does Spain serve as Morocco’s primary gas entry point via pipeline, but it also acts as the gateway linking Morocco’s grid to the broader European energy network. In a landscape marked by rising tensions over Ceuta and Melilla, and intensifying geopolitical competition in North Africa, this energy interdependence could become a decisive factor in the bilateral power balance.
Rabat wields significant influence in other areas, from migration control to security partnerships. Yet on the energy front, Morocco’s reliance on Spanish infrastructure remains one of its most exposed vulnerabilities—a silent counterbalance in a relationship defined by competing ambitions.



