While diplomatic tensions between Morocco and Spain often grab headlines—whether over migration flows, territorial disputes, or Western Sahara—an overlooked dimension shapes their complex relationship: energy dependency. Despite Rabat’s bold geopolitical posturing, particularly regarding Ceuta and Melilla, the kingdom remains heavily reliant on Spanish-controlled energy infrastructure for critical supplies.
Energy has quietly become Spain’s most potent strategic leverage in this rivalry. Morocco currently imports all its piped gas via Spanish-controlled pipelines, while its electricity grid depends on interconnections with the Iberian Peninsula to meet growing demand and balance supply fluctuations. This reliance creates a paradox: as Rabat challenges Madrid’s sovereignty over certain territories, its own energy security remains inextricably tied to Spanish systems.
Gas flows reversed: from transit corridor to supply channel
The rupture in Morocco–Algeria relations in 2021 reshaped the energy landscape between Rabat and Madrid. When Algiers halted the Maghreb-Europe Gas Pipeline (GME) that previously carried Algerian gas through Morocco into Spain, the infrastructure’s purpose shifted dramatically. No longer a transit route, the GME became a conduit for Spanish gas exports to Morocco.
Official data indicates that in 2025, Morocco received approximately 10.3 TWh of gas through this reversed pipeline—equivalent to roughly a quarter of Spain’s total gas exports that year and valued at nearly €400 million. This arrangement underscores how Spain now holds indirect control over a significant portion of Morocco’s gas supply.
Rabat’s push for energy independence
Morocco is not passively accepting this dependency. The kingdom is actively pursuing alternatives to reduce its vulnerability. Key initiatives include the Nador West Med LNG terminal, designed to enable direct maritime gas imports and feed into the Maghreb-Europe pipeline network. Additionally, the proposed Nigeria-Morocco Gas Pipeline—a massive trans-Saharan project—aims to connect West African gas reserves to European markets, potentially reshaping regional energy dynamics.
Yet these long-term solutions require substantial time and investment. In the interim, Spain’s infrastructure remains indispensable. The Nador West Med terminal and other projects are years away from full operational capacity, leaving Rabat exposed to potential disruptions in its primary supply routes.
Electricity ties: Spain’s unspoken power over Morocco
The energy interdependence extends beyond gas. Two submarine cables link Morocco’s grid to Spain’s, with a combined capacity of 1,400 MW. In 2025 alone, Spain exported a record 3,743 GWh of electricity to Morocco—a 47.5% year-on-year increase and the highest volume since 2017. Nearly three-quarters of this capacity flows from the Iberian Peninsula to Morocco, reinforcing Madrid’s role as a key supplier.
This connection is more than a commercial transaction; it provides Morocco with critical flexibility to meet surging electricity demand amid industrial expansion and renewable energy development. Plans for a third submarine cable further highlight the strategic importance of these interconnections, which allow both countries to balance supply and demand across borders.
Ceuta and Melilla: an energy divide within Spain
The Morocco-Spain energy relationship reveals another striking paradox. While Morocco has been connected to Europe’s electrical grid via Spain for nearly three decades, the Spanish enclaves of Ceuta and Melilla have historically operated as energy islands, disconnected from the mainland grid.
Ceuta is poised to break free from this isolation in 2026 with the completion of a new submarine cable linking the city to the Spanish mainland. The €300 million project aims to enhance energy security and reliability for the enclave. Melilla, however, remains geographically constrained, leaving it dependent on local generation despite its Spanish sovereignty.
This contrast underscores a broader reality: Morocco’s mainland is plugged into Europe’s energy network through Spain, while parts of Spain itself still rely on isolated systems—a dynamic that adds complexity to their geopolitical interplay.
A new dimension in Morocco-Spain relations
Energy infrastructure has traditionally been viewed through an economic lens, but geopolitical tensions in the Mediterranean have elevated its strategic significance. While Spain holds no apparent intention of weaponizing its energy exports, the structural interdependence creates a potential lever of influence that neither side can ignore.
For years, Rabat has held the upper hand on issues like migration control, counterterrorism cooperation, and territorial disputes. Yet energy introduces a counterbalance. The reversal of gas flows through the Maghreb-Europe pipeline and the dominance of Spanish electricity exports to Morocco represent vulnerabilities that Rabat is acutely aware of—and actively working to mitigate.
Who holds the energy card?
Morocco is racing to diversify its energy sources, with projects like Nador West Med and the Nigeria-Morocco pipeline central to its long-term strategy. However, these initiatives are years away from fruition, leaving Rabat reliant on Spanish infrastructure in the near term.
This reality places Spain in a uniquely powerful position. It is not only the gateway for Morocco’s piped gas imports but also the bridge connecting Morocco’s grid to Europe’s continental energy system. In a region rife with territorial disputes and geopolitical rivalries, this energy dependency may prove to be one of the most consequential—and least discussed—factors shaping the future of Morocco-Spain relations.
More Stories
How the us-Morocco alliance shapes migration and security in africa
Waiting for Cameroon’s political transition in Yaoundé
Sénégal elections: ruling party warns against any delay to polls