When the grid goes dark: Spain’s blackout and the urgent need for smarter energy systems

When the grid goes dark: Spain’s blackout and the urgent need for smarter energy systems

Haniy Banti, outstanding student and champion of the Sustainability Datathon 2025, puts forward her thoughts on smart energy in Spain.

On Monday, April 28, parts of Spain were abruptly plunged into darkness. The sudden power outage disrupted daily life and raised serious questions about the resilience of modern energy systems, especially in a country often hailed as a leader in renewable energy. While power was eventually restored, the blackout exposed vulnerabilities that could become more frequent as Europe transitions to a cleaner, more decentralized energy model.

The event prompted questions: How could this happen in a country that’s become a leader in renewable energy? And, more broadly, how resilient is Europe’s power grid in the face of growing demand, climate volatility and the shift toward clean energy?

This wasn’t just a technical failure. It was a wake-up call.

Europe’s interconnected grid: Strength or weakness?

Europe’s electricity system is one of the most interconnected in the world, with high-voltage transmission lines allowing electricity to flow across borders from Spain and Portugal to France, Germany and beyond. This setup facilitates energy trading, enhances stability and helps balance supply & demand across the continent.

But this interdependence also creates risk. A technical fault, cyberattack or environmental shock in one area can have ripple effects across the grid. Spain, for example, relies heavily on limited interconnection points, especially with France. If these lines become overloaded or fail, the country’s ability to import or export energy is constrained, which may result in regional blackouts like the one we just witnessed.

As renewable generation continues to grow, particularly from variable sources like wind and solar, the pressure on grid flexibility and infrastructure only intensifies.

Clean energy, complex challenges

Spain is a leader in renewable energy, with ambitious targets and strong solar and wind capacity. Yet despite this progress, the country faces a paradox: having an abundance of clean energy doesn’t guarantee reliability.

The issue isn’t just production. It’s storage, timing and distribution. In 2022 alone, over 3 TWh of wind energy was curtailed in Spain because it couldn’t be used when generated. Without adequate storage or grid flexibility, this kind of waste is inevitable.

Blackouts like the recent one show that simply adding more renewables isn't enough. We also need the tools to manage them.

What we learned from the Datathon

Earlier this year, we tackled this exact challenge in the IE-Repsol Sustainability Datathon. Our team analyzed energy data from Repsol’s Pinto industrial facility to explore how photovoltaic (PV) self-consumption and battery energy storage could optimize energy use and reduce CO₂ emissions.

Using solar forecasting and a simulated 100 kWh battery system, we found that over 75% of solar generation could be effectively utilized, much of it stored for later use during peak demand or grid stress. In just one month, this approach avoided nearly 350 kilograms of CO₂ emissions. More importantly, it demonstrated how localized, intelligent energy systems can operate even when the grid falters.

The implications go beyond sustainability. In an outage scenario, facilities equipped with battery-backed solar systems could maintain partial operations, providing a buffer that centralized grids often cannot.

Rethinking Energy Resilience

Spain’s blackout and others like it across Europe highlight the urgent need to modernize our approach to energy security. That means rethinking system design around resilience, not just capacity. Key priorities include:

  • Battery storage at industrial, commercial and residential scales
  • Smarter energy forecasting tools driven by AI and real-time data
  • Decentralized microgrids capable of functioning independently when needed
  • Dynamic discharge scheduling that releases stored energy during high carbon intensity or peak demand hours

These tools aren’t theoretical. They’re actionable and already proving effective in pilot projects like the one we worked on in the Datathon.

Conclusion

The transition to clean energy is essential, but resilience must be its foundation. Spain’s recent blackout didn’t just flick a switch; it illuminated the cracks in a system still energy system that is still adapting to new demands and technologies. As the grid grows greener, it must also grow smarter, more flexible and more local.

The question isn’t whether we can power the future. It’s whether we can keep it running when the unexpected happens.

Read more about Haniy’s success at the Sustainability Datathon 2025.