Energy ties between Morocco and Spain: hidden leverage in political tensions

Energy supply has emerged as a silent yet powerful factor in the recurring tensions between Morocco and Spain. While diplomatic rows often focus on migration flows, territorial disputes, or the Western Sahara issue, the Moroccan kingdom remains heavily reliant on Spanish infrastructure for both gas and electricity. This dependency reveals an unexpected vulnerability in Rabat’s strategic positioning.

Morocco currently imports all its piped gas through Spanish-controlled pipelines, and its national grid is interconnected with the Iberian Peninsula’s electricity network. This arrangement provides critical flexibility and backup capacity, especially as demand grows and renewable energy projects expand across the country.

The situation creates a paradox: despite challenging Spain’s sovereignty claims over Ceuta and Melilla, Morocco continues to depend on energy links that pass through or are operated by its neighbor. A closer look at the infrastructure reveals how deeply these ties bind the two nations together.

Gas pipeline reversal reshapes supply chains

The rupture of diplomatic ties between Morocco and Algeria in 2021 marked a turning point in regional energy flows. With Algeria halting gas exports via the Maghreb-Europe Pipeline (GME)—which once carried Algerian gas through Morocco to Spain—the direction of the pipeline reversed. Instead of receiving Algerian gas, Morocco began importing gas from Spain through the same infrastructure.

Official data indicates that in 2025, Morocco received approximately 10.3 TWh of gas via the GME, valued at around €400 million. This volume accounts for nearly a quarter of Spain’s total gas exports through its pipeline system that year. The shift underscores how Morocco’s energy security now hinges on Spanish-controlled networks.

Morocco’s push for energy independence

Rabat is not remaining passive in the face of this dependency. The government has launched major projects aimed at diversifying energy sources and reducing reliance on Spanish infrastructure. Among them, the Nador West Med LNG terminal stands out as a key initiative. Scheduled for completion in the coming years, the facility will allow Morocco to import liquefied natural gas directly via maritime routes and inject it into the Maghreb-Europe pipeline network.

Another ambitious endeavor is the proposed Nigeria-Morocco Gas Pipeline, designed to connect West African gas reserves with markets in North Africa and Europe. Though still in development, the project could significantly alter the regional energy landscape once operational.

Yet, these long-term solutions require substantial investment and time. For now, Spain remains Morocco’s primary gateway for piped gas imports and a vital link to the European electricity grid.

Electricity interconnections: Spain’s growing influence

The energy interdependence extends beyond gas. Two undersea cables link the Spanish and Moroccan power 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% increase from the previous year and the highest level since 2017. Nearly three-quarters of this capacity is used for electricity flows from Spain to Morocco.

This electrical connection serves a dual purpose. It provides Morocco with additional capacity to support its rising industrial demand and renewable energy expansion, while also enabling cross-border energy trading. Both countries are now exploring plans to construct a third undersea cable to further enhance interconnection capacity.

Ceuta and Melilla: energy sovereignty contrasts

The paradox deepens when examining the status of Ceuta and Melilla—Spanish enclaves on Moroccan soil. Despite Morocco’s integration into the European power grid via Spain, these territories have historically 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 undersea cable connecting it to the Iberian Peninsula. The €300 million project aims to bolster energy security for the city. Melilla, however, remains isolated due to geographical constraints, creating a striking contrast: Morocco benefits from European energy integration, while parts of Spain do not.

Geopolitical leverage in an interdependent relationship

The energy dimension adds a new layer to the Morocco-Spain relationship. While economic and technical cooperation continues, the structural dependency raises questions about future political leverage. A deliberate disruption of gas or electricity flows would carry significant economic and diplomatic repercussions for both sides.

Despite Morocco’s strong position in migration control and regional security cooperation, energy ties introduce a counterbalance. Spain now holds a strategic advantage through its control of critical infrastructure that Morocco cannot easily replace in the short term. This reality could redefine the power dynamics between the two kingdoms, especially amid ongoing disputes over Ceuta, Melilla, and broader Mediterranean geopolitics.

Spain’s cards in the energy equation

Morocco is actively working to reduce its energy dependence on Spain, with projects like Nador West Med and the Nigeria-Morocco pipeline representing long-term solutions. However, none of these alternatives can immediately replace the existing infrastructure.

For now, Spain remains indispensable to Morocco’s energy security. Whether through piped gas imports or electricity interconnections, the Iberian neighbor holds a pivotal role. In a regional climate marked by competing interests and unresolved territorial claims, this energy interdependence could become a decisive factor in shaping the future of Morocco-Spain relations.