The relationship between Spain and Morocco, beyond borders and immigration, has a crucial energy dimension. The two electrical interconnections under the Strait of Gibraltar supply electricity to the neighboring country, whose importance has grown in recent years for the Moroccan energy system.
According to official data, in 2025 Spain exported approximately 3.9 terawatt-hours (TWh) of electricity to Morocco, accounting for 8% of Morocco's total demand (around 49 TWh). The export balance in favor of Spain was 3,743 gigawatt-hours (GWh), the highest since 2017 and the fourth consecutive year with a net export surplus.
This Moroccan energy dependence becomes relevant in the context of bilateral relations, especially after the Ceuta migratory crisis. The energy connection represents an inverse dependency: Morocco needs Spain more for certain energy supplies than Spain needs Morocco.
The first electrical connection between the two countries dates back to 1997, with an initial capacity of 700 megawatts (MW), expanded to 1,400 MW in 2006. Spanish exports have been key to the growth of Moroccan electricity consumption, reaching around 15% of the demand between 2007 and 2017.
The closure of the Maghreb-Europe gas pipeline at the end of 2021, following Algeria's decision not to renew the contract, reinforced the importance of these connections. Electricity from Spain has become an element of stability for the Moroccan energy system, an essential role according to experts like Manuel Antonio Fernández-Villacañas.
The trend continues in 2026, with a Spanish export balance of 2,600 GWh as of July. Furthermore, Spain and Morocco are collaborating on a third electrical interconnection focused on renewable energies.
The energy dependence is not limited to electricity. Spain is also a primary supplier of oil products for Morocco. In 2025, the Maghreb country purchased over three million tons of oil products from Spain, nearly 23% of its total imports.
Diesel fuel was the most demanded product, with 21.5% of Moroccan diesel imports coming from Spain, although Spanish sales of this fuel decreased by 22.4% year-on-year. This decline is attributed, in part, to the rise of Russian diesel in the Moroccan market following the EU's import ban.
Despite the advancement of renewables, oil products remain central to Morocco's energy economy, representing 51% of its energy mix in 2025.
While interconnections benefit Spain by allowing exchanges and grid stability, the energy relationship is asymmetric. Morocco significantly depends on the Peninsula for its supply, whereas Spain does not have a comparable dependence.
This energy difference adds another factor to the complex bilateral relationship, marked by migration, trade, security, and the Western Sahara. The contrast is notable when compared to the relationship with Algeria, a fundamental supplier of natural gas to Spain, which grants Algeria greater leverage.




