In May 2021, a mass crossing of migrants from Morocco into Ceuta, a Spanish enclave in North Africa, triggered a diplomatic crisis between Madrid and Rabat. Spain considered using its energy leverage—Morocco relies on a submarine gas pipeline from Spain—but experts question its effectiveness.
Morocco has since reduced its dependence on Spanish energy. In 2022, Rabat signed agreements with Portugal and other suppliers, and it has invested in renewable energy. By 2026, Morocco's energy mix is more diversified, weakening Spain's potential pressure tool.
Spain's energy exports to Morocco, including electricity and gas, have declined. According to recent data, Spain's electricity exports to Morocco fell by 30% in 2025 compared to the previous year, as Morocco increased its own generation capacity.
Diplomatic relations have improved since 2022, with Spain backing Morocco's autonomy plan for Western Sahara. However, the Ceuta border remains a flashpoint, and energy leverage is seen as a blunt instrument that could harm Spain's own interests.