Electricity was restored to most of Spain and Portugal early on Tuesday after huge nationwide blackouts, although authorities were still trying to find out what caused the sudden outage.

In Spain, schools and offices reopened, public transport restarted after long delays, traffic gridlock eased and many hospitals had recovered power while others continued to operate on generators.

Spain's electricity grid operator Red Electrica said it was able to supply virtually all of the country's electricity demand on Tuesday morning, while Portugal's equivalent, REN, said that by late on Monday it had all 89 power substations in the country back up and running.