The force of the crash crumpled the front of the train against the buffer and detached a sheet of metal.
Nineteen of the injured, including the driver, were taken to hospital, emergency services said, while medics treated others on stretchers on the platform. They had previously given the number of injured as 48.
Many of the passengers were already standing, ready to get off, when the train crashed, the newspaper La Vanguardia reported.
The train was coming from the village of Sant Vicenc de Calders in the province of Tarragona on the R2 line of the Rodalies commuter rail service, emergency services said.
(Reporting by Sonya Dowsett Editing by Kevin Liffey)
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)