Today I is learned...

The country’s nuclear plants, as planned, were operating at half their usual capacity because, according to their owners, the high charges they are subject to make them economically unviable during periods when the price of electricity is very low.
At that time the price of electricity on the official market was in the negative at around -1€/MWh. At these prices Spain was exporting electricity to Morocco, Portugal, and even France. In addition, much of the available energy was being used to pump water from low lying river basins into reservoirs – the only practical way to store energy on a large scale. However, this capacity has a limit and, with the reservoirs almost full, it cannot continue to be stored indefinitely.
And there is a lengthy discussion here:

Spain-Portugal blackouts: what actually happened, and what can Iberia and Europe learn from it?