BARCELONA, Spain (AP) 鈥 A major power outage hit Spain and Portugal on Monday, including their capitals, knocking out subway networks, phone lines, traffic lights and ATM machines.

Authorities said the cause was not immediately known, though one Portuguese official said the problem appeared to be with the electricity distribution network in Spain.

The Portuguese Cabinet convened an emergency meeting at the prime minister鈥檚 residence, and Spanish Prime Minister Pedro S谩nchez visited power distributor Red El茅ctrica to follow efforts at restoring grid operations.

The countries have a combined population of over 50 million people. It was not immediately clear how many were affected.

It is rare to have such a widespread outage across the Iberian Peninsula. Red El茅ctrica said the incident was being assessed.

A couple of hours later, Spain鈥檚 electricity network operator said it was recovering power in the north and south of the peninsula, which would help to progressively restore the electricity supply nationwide.

Portugal鈥檚 government said the outage appeared to stem from problems outside the country, an official told national news agency Lusa.

鈥淚t looks like it was a problem with the distribution network, apparently in Spain. It鈥檚 still being ascertained,鈥 Cabinet Minister Leit茫o Amaro was quoted as saying.

Portuguese distributor E-Redes said the outage was due to 鈥渁 problem with the European electricity system,鈥 according to Portuguese newspaper Expresso. The company said it was compelled to cut power in specific areas to stabilize the network, according to Expresso.

Spain鈥檚 public broadcaster RTVE said a major power outage hit several regions of the country just after midday local time, leaving its newsroom, Spain鈥檚 parliament in Madrid and subway stations across the country in the dark.

A graph on Spain鈥檚 electricity network website showing demand across the country indicated a steep drop around 12:15 p.m. from 27,500MW to near 15,000MW.

Video aired on Spanish television showed people evacuating metro stations in Madrid and empty stations with trains stopped in Barcelona.

Spain鈥檚 traffic department is asking citizens to avoid using their cars as much as possible due to the power outage, which has affected traffic lights and electrical road signage.

In Terrassa, an industrial town 50 kilometers (31 miles) from Barcelona, stores selling generators were out of stock after people lined up to buy them.

Portugal鈥檚 E-Redes said parts of France also were affected.

In Portugal, a country of some 10.6 million people, the outage hit the capital, Lisbon, and surrounding areas, as well as northern and southern parts of the country. Portuguese police placed more officers on duty to direct traffic and cope with increased requests for help, including from people trapped in elevators.

Portuguese hospitals and other emergency services switched to generators. Gas stations stopped working and trains stopped running.

Portugal鈥檚 春色直播 Authority for Emergencies and Civil Protection said backup power systems were operating.

Several Lisbon subway cars were evacuated, reports said. Also in Portugal, courts stopped work and ATMs and electronic payment systems were affected. Traffic lights in Lisbon stopped working.

It was not possible to make calls on mobile phone networks, though some apps were working.

___

Hatton reported from Lisbon, Portugal.

The 春色直播 Press. All rights reserved.