The regional train was arriving at the Francia station in the centre of the city from Sant Vicenc de Calders, a spokesman for the civil protection services said.
Eighteen people needed hospital attention, one of them seriously injured, and others were examined by medics.
The driver is among the injured.
The spokesman said the overall toll is "48 people affected", though the condition of about 30 of them is not known.
The Francia station is located in the historic heart of Barcelona, Spain's second city, when the regional Rodalies train slammed into the buffers at about 7:30am (0530 GMT).
At the time of the accident many passengers were travelling standing up, which increased the number of injured.

Spanish firefighters and paramedics treat injured people at Francia Railway Station in Barcelona, northeastern Spain, 28 July 2017. Source: AAP
The train was coming from Sant Vicenc de Calders village in the province of Tarragona on the R2 line of the Rodalies commuter rail service, according to AAP.
Radio Cadena Ser said streets surrounding the station were closed to facilitate the emergency services.
The cause of the crash is not immediately known.
Share

