General power outages, such as the one that struck Spain and Portugal earlier this week, can stem from various causes, but the incident underscored the fragility of the regional system on the Iberian Peninsula.
The electrical grid is a backbone with complex branches consisting of thousands of interconnected components.
"The grid operators must carefully analyse massive amounts of real-time data like frequency shifts, line failures, generator statuses and protection system actions to trace the sequence of events without jumping to conclusions," Pratheeksha Ramdas, senior new energies analyst at Rystad Energy, told Agence France-Presse (AFP).
Outages are often caused by the sudden shutdown of a source of production, such as a power plant, due to a technical fault or a fuel shortage that supplies thermal power plants.
In recent years, natural disasters such as storms, earthquakes, forest fires, extreme heat, or cold, sometimes intensified by global warming, have damaged infrastructure or created peaks of demand for heating or air conditioning.
Other possible causes include overloads on high-voltage power lines, which force excess electricity to flow to other lines, and cyberattacks, which Spain and Portugal have ruled out, but are an increasingly mentioned threat as networks become more digitized.
In Spain on Monday evening, the grid operator REE reported a "strong fluctuation in power flows, accompanied by a significant loss of production."
In Europe, the electrical frequency on the network is standardized at 50 hertz (Hz).
A frequency below that level means not enough electricity is being produced to meet demand.
In contrast, a frequency above 50 Hz means that less electricity needs to be generated.
Operators must order power plants in real-time to produce more or less electricity according to demand to keep a frequency of 50 Hz.
"Maintaining that frequency is a matter of balance," said Michael Hogan, senior advisor at the Regulatory Assistance Project, a nongovernmental organization (NGO).
If the frequency deviates from 50Hz, automated protection systems activate to isolate parts of the grid, preventing damage to equipment through a domino effect.
"Once power stations begin to shut themselves down for protection, the situation can quickly get out of control," Hogan told AFP.
"But ... It's very rare for that to reach the state it did in Iberia yesterday (Monday)."
How Monday's problem all started is difficult to determine.
"One of the factors that most likely contributed to the instability is the weak interconnection between the peninsula and the rest of the Western European grid, which meant that there wasn't much inertia in that part of the network to dampen the oscillations on the Spanish side of the interconnection," said Hogan.
However, that is likely only a contributory factor, not the root cause.
"It will probably be the failure of one or two major transmission facilities, which then cascaded to other connected parts of the network," said Hogan.
"But what would have caused that initial transmission failure remains to be learned."
In Spain, about 40% of electricity comes from solar or wind power. At midday on Monday, it had even risen to about 70%.
Unlike gas-fired power stations, which require several minutes to start, solar and wind generation cannot be controlled on demand and must often be curtailed, Rystad Energy's Ramdas told AFP.
The European Network of Transmission System Operators (ENTSO-E) issued a warning on April 18 about the risks of solar overproduction as good weather conditions approach.
Ramdas said Monday's disruption was a "clear warning."
"Without stronger domestic resilience and improved regional coordination, future grid failures could have even more consequences," she wrote in a client note.
"Without sufficient flexibility measures like storage, fast-ramping plants or strong interconnectors, large swings in renewable output can destabilize the grid," she told AFP.
Lion Hirth, an energy consultant and professor of energy policy at the Hertie School in Berlin, said it was "likely" that "a system with very little conventional generation online (nuclear, gas, coal, hydro) has less dampening inertia, (in other words) is more prone to such oscillations getting out of control.
"So, despite the uncertainty, I think it is fair to say that it didn't help that the Iberian system was mostly running on wind and solar on Monday noon," he added.