High winds battering northern Spain have brought down the roof of a sports hall near Barcelona, killing three children, local officials say.
Two adults died in other storm-related incidents elsewhere in the north.
Torrential rains and winds of up to 172km/h (107mph) have been battering northern Spain and south-west France.
At least one million homes in France are without electricity, roads and railways have been blocked and airports ordered closed, authorities there said.
Residents in affected areas in both countries have been warned to stay indoors.
French weather agencies forecast the storm but it has affected a wider area than expected. A state of “red alert” has been declared in nine departments.
Huge waves swept in from the Atlantic overnight battering the French and Spanish coastline.
In France, the storm has caused havoc from the Dordogne area to the Pyrenees.
As it moved east, the torrential rains caused flooding in some areas prompting thousands of calls to the emergency services.
The force of the storm also led to the closure of airports in Bordeaux, Pau and Biarritz, and Toulouse.
Train services have also ground to a halt, leaving several hundred passengers stranded in stations overnight.
The sports hall collapse happened in the town of Sant Boi de Llobregat, near Barcelona.
“Part of the building collapsed, there were between 20 and 30 youngsters inside. We know there are some dead and 16 injured,” a local government spokeswoman told AFP news agency.
Two other deaths have been reported in Spain.
A policeman was killed by a falling tree as he directed traffic in Burela, Galicia, and a woman was killed by a wall collapse, reportedly in Barcelona.
The storms are expected to spread eastwards on Saturday bringing the risk of further heavy rain, strong winds and disruption, BBC weather experts said.
Although expected to weaken over the next 12-18 hours, parts of southern France could still see some damage, with the storm’s strong winds funnelling through the Rhone valley overnight, BBC Weather’s Liam Dutton said.
Hundreds of technicians had been deployed to try to restore power to residents by the end of the day, but blocked roads are hampering their efforts.
“The number of clients who are cut off from the grid is rising from minute to minute as the storm moves eastwards,” Michel Francony, head of the regional electricity grid operator ERDF, told local radio.
The storm is the most powerful to hit the French region since December 1999, when 88 people were killed and some four million homes left without power.