A train driver has been killed and at least 37 people injured, five seriously, after a commuter train derailed and crashed near Barcelona two days after a deadly two-train collision in southern Spain.

According to local officials, the Rodalies train collided with a retaining wall which fell on to the track between Gelida and Sant Sadurní.

Catalonia regional fire Inspector Claudi Gallardo said all the passengers had been removed from the train.

The incident occurred as heavy storms battered north-eastern Spain, with coastal areas in the east and north-west of Spain on high alert because of the weather.

Rail officials believe the wall collapsed as the train was passing shortly after 21:00 (20:00 GMT) on Tuesday evening, striking the driver's cab first and then causing considerable damage to the first carriage of the train in which most of the injured passengers were travelling.

The identity of the driver was not immediately clear as three trainees had been with the driver when the accident happened. Firefighters said two of them were among those seriously injured.

It took almost an hour to free one of the survivors at the scene in Gelida, about 35km (22 miles) west of Barcelona.

Emergency services said they had evacuated some of the injured to nearby Moisès Broggi, Bellvitge, and Vilafranca hospitals.

Services across Catalonia's main Rodalies commuter rail network have been suspended completely while safety checks are carried out and officials say they will not resume until lines are considered safe.

Spanish train drivers' union Semaf has called a strike as a result of the two deadly crashes, at Gelida on Tuesday and near Córdoba in Andalusia where at least 43 people died.

Local officials in Catalonia believe heavy rain after months of drought is to blame for the collapse of the wall. Meanwhile, another train on the Barcelona commuter network also derailed on Tuesday.

As a result of the suspension of services across the entire Rodalies network in Catalonia, about 400,000 commuters are expected to be affected, according to Spanish newspaper El País.