A massive power outage appears to be affecting large portions of Spain and Portugal Monday.

Red Electrica, the operator of Spain’s power grid, said early Monday morning it had begun its plan to restore electricity and that the cause of the outage was being analyzed. “All resources are being dedicated to solving it,” the agency said on X.

It later said it had begun to restore power to the northern and southern portions of the peninsula. The agency said the process involves the gradual restoration of the transmission grid, and that it continues to work to restore power.

More news: Vatican announces conclave to elect new pope will begin on May 7: Live updates

‘Entire national electricity grid was cut off’

Renfe, Spain’s national railway company, said on social media Monday the “entire national electricity grid was cut off” at 12:30 local time, and that trains were stopped and without departures at all stations.

The British Broadcasting Corporation, citing local reports, said the outage caused traffic jams in the center of the Spanish capital of Madrid due to traffic lights not working.

Parts of Barcelona and Lisbon were also affected by the outage, with public transport, traffic lights, and phone services mostly down, according to Bloomberg.

Gabe Hauari is a national trending news reporter at USA TODAY. You can follow him on X @GabeHauari or email him at Gdhauari@gannett.com.

This article originally appeared on USA TODAY: Power outage hits portions of Spain Monday: Here’s what we know