Analyses

Morocco’s hidden energy tie to Spain amid geopolitical tensions

Energy grids, gas pipelines, and power cables: beneath the recurring disputes between Morocco and Spain lies a less visible but critical dependency. While Rabat asserts its claims over Ceuta and Melilla, its energy security remains closely tied to Spanish infrastructure.

Geopolitical tensions between Madrid and Rabat are often framed around migration, territorial disputes, or security cooperation. Yet, one strategic dimension remains understated: energy. Morocco’s reliance on Spanish systems for gas and electricity supply has created an asymmetrical interdependence that shapes their bilateral relations.

Currently, Morocco imports all its piped gas via Spanish-controlled pipelines and depends on electrical interconnections with the Iberian Peninsula for grid stability and flexibility. This reliance introduces a paradox: Rabat challenges Spain’s sovereignty over certain territories while its energy supply hinges on Spanish infrastructure.

The shifting dynamics of the Maghreb-Europe gas pipeline

The rupture in Morocco’s energy landscape occurred after Algeria severed its gas supply agreement in 2021. The Maghreb-Europe Gas Pipeline (GME), which previously transported Algerian gas through Morocco to Spain, reversed its flow. Following the breakdown in Algerian-Moroccan relations, Spain began supplying gas to Morocco via the same pipeline.

Data from 2025 indicates Morocco received approximately 10.3 TWh of gas through this channel, valued at around €400 million—nearly a quarter of Spain’s total gas exports that year. This transformation turned a once one-way transit route into a two-way energy lifeline.

Rabat’s push for energy autonomy

Morocco is not passively accepting this dependency. Key infrastructure projects signal a shift toward reducing reliance on Spanish networks. The Nador West Med LNG terminal, currently under development, will allow direct maritime gas imports and integration into the GME network. Additionally, the proposed Nigeria-Morocco Gas Pipeline aims to connect West African gas reserves to Moroccan and European markets, potentially reshaping regional energy dynamics.

These initiatives require substantial investments and time. Until they come online, Spain remains Morocco’s primary gas transit partner and electricity supplier through two undersea cables with a combined capacity of 1,400 MW.

In 2025, 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 the interconnection’s capacity flows from Spain to Morocco, reinforcing Madrid’s role as an energy provider despite ongoing political frictions.

Ceuta and Melilla: a contrasting energy reality

The energy interdependence between the two countries reveals another paradox. While Morocco benefits from grid connections to Europe via Spain, the Spanish enclaves of Ceuta and Melilla have historically operated as energy islands, disconnected from the mainland grid.

Ceuta is set to break this isolation in 2026 with a new €300 million undersea cable linking it to the Iberian Peninsula, enhancing energy security. Melilla, however, will remain dependent on local systems due to its geographical distance.

The contrast is striking: Morocco’s continental territory is integrated into the European energy network through Spain, while parts of Spain itself remain energy-isolated. This asymmetry underscores the complexity of their relationship.

Energy as a silent bargaining chip

The strategic importance of these energy ties extends beyond economics. In a region marked by geopolitical competition, infrastructure interdependencies introduce new layers of vulnerability and influence. While neither country may weaponize energy supplies, the structural dependency creates a potential lever that neither can ignore.

Madrid and Rabat have historically balanced power across migration control, security cooperation, and territorial disputes. Energy now introduces an additional dimension—one where Spain holds a stronger position than often acknowledged. Morocco’s efforts to diversify supply through LNG terminals and transcontinental pipelines reflect an attempt to reclaim autonomy, but the transition will be gradual.

The current reality places Spain in a unique position: it serves as both the gateway for Morocco’s piped gas imports and the bridge linking Morocco’s power grid to Europe. As tensions persist over Ceuta and Melilla, this energy dynamic may increasingly shape the balance of power between the two kingdoms.