The recurring tensions between Morocco and Spain often focus on migration flows, territorial disputes, or Ceuta and Melilla. Yet beneath these headlines lies a less visible but critical factor shaping their relationship: energy dependence.
Rabat relies heavily on Spanish energy infrastructure for its electricity and gas supplies, creating a strategic imbalance in their geopolitical rivalry. While Morocco frequently asserts claims over Spanish enclaves, its energy security remains tied to networks controlled by Madrid.
Gas pipeline reversal: from Moroccan transit to Spanish export
Morocco’s energy vulnerability became evident after Algeria severed its gas supply through the Maghreb-Europe pipeline in 2021. The rupture forced a fundamental shift: what was once a transit route for Algerian gas to Europe became a channel for Spanish gas exports to Morocco.
According to recent data, Morocco imported approximately 10.3 TWh of gas in 2025 through this reversed pipeline, amounting to nearly €400 million in costs. This volume represents about a quarter of Spain’s total gas exports that year.
Rabat’s push for energy independence
Moroccan authorities recognize this dependency and are actively developing alternatives. The Nador West Med LNG terminal will allow direct gas imports via maritime routes, while the proposed Nigeria-Morocco gas pipeline aims to connect West African gas fields to Moroccan markets.
However, these long-term projects require significant investment and time. Until their completion, Spain remains Morocco’s primary gas supplier via pipeline.
Electric interconnections: Spain’s silent advantage
Beyond gas, electricity ties further strengthen Spain’s position. Two undersea cables link the Spanish and Moroccan grids, with a combined capacity of 1,400 MW.
In 2025, Spain exported a record 3,743 GWh of electricity to Morocco—a 47.5% increase from the previous year. Three-quarters of this capacity flows from Spain to Morocco, providing the kingdom with vital grid stability amid rising energy demand.
A third interconnection cable is under discussion, which would further integrate the two countries’ energy systems.
Ceuta and Melilla: a paradox in energy connectivity
The energy interdependence highlights another contradiction: while mainland Morocco benefits from European grid connectivity via Spain, the Spanish cities of Ceuta and Melilla have historically operated as energy islands.
Ceuta will finally gain grid access in 2026 through a €300 million undersea cable project, securing its energy supply. Melilla, however, remains isolated due to geographic constraints.
Geopolitical leverage in energy cooperation
These energy links were once seen purely as economic necessities. Today, they carry growing strategic importance amid renewed Mediterranean tensions and North African geopolitical shifts.
While Spain has no apparent interest in weaponizing energy supplies, this interdependence creates a structural vulnerability for Morocco. It adds a new dimension to their power dynamics, where Spain holds significant leverage despite Morocco’s strengths in other areas.
For decades, Morocco has maintained pressure on Spain over Ceuta and Melilla while controlling migration flows. Yet its energy dependence introduces a counterbalance—one that could reshape their negotiations in unexpected ways.
