BARCELONA, Spain — A blackout brought much of Spain and Portugal to a standstill Monday, halting subway and railway trains, cutting phone service and shutting down traffic lights and ATMs for millions of people across the Iberian Peninsula.

Spainish Prime Minister Pedro Sánchez said a problem in the European grid that he described as a “strong oscillation” was behind the outage, but the cause was still being determined.

Spanish power distributor Red Eléctrica said restoring power fully to the country and neighboring Portugal could take six to 10 hours. By midafternoon, voltage was progressively being restored in the north, south and west of the peninsula, the company said. — Associated Press