A massive power outage has knocked out electricity across parts of Spain and Portugal, shutting off traffic lights and causing chaos at airports, train stations and on the roads. Portugal's grid operator Redes Energéticas Nacionais (REN) said electrical supply was lost across the entire Iberian peninsula, and in parts of France, late on Monday morning. Spanish power grid operator Red Electrica said it was working with energy companies to restore power. "The causes are being analyzed and all resources are being dedicated to solving it," it said. The outage took out screens, lighting and power sockets throughout the region; Portugal's police force told people to avoid unnecessary journeys because traffic lights were at risk of failing. "Reduce your speed and pay extra attention," they said. "Prioritise safe driving: your calmness saves lives." In Madrid, traffic piled up on the roads after the lights went out. "I was driving and suddenly there was no traffic lights ... It was a bit of a jungle," Luis Ibáñez Jiménez told CNN. "I saw a massive bus coming, and I had to accelerate a lot to go past it." And a holidaymaker inside Lisbon's Humberto Delgado airport said hundreds of people were stood in the dark in queues, with no air conditioning or running water. Shops were only accepting cash, she told CNN. Spanish train operator Renfe said there was a power outage at a national level, causing trains to stop and departures to be canceled. And E-Redes, which provides electiricty to mainland Portugal, said in a statement it was working to re-establish connection. "This is a wider European problem," the company said in a statement, according to Reuters. — CNN