A commuter train slammed into the end of the platform during the morning rush hour at a busy station in Barcelona on Friday, leaving 54 people injured, emergency services said.
One person was seriously injured, 19 were injured "less seriously" including the driver, and 34 were lightly injured in the accident at Francia station in the centre of the Spanish city, emergency services said on Twitter.
A French citizen and a Romanian were among the injured, a spokesman for the civil protection agency said. The rest were Spanish nationals.
The regional train, travelling from the town of Sant Vicenc de Calders located about 70 kilometres southwest of Barcelona, ran into the buffers at 7:15 am, Spanish train operator Renfe said.
At the time of the accident many passengers were standing up in the busy carriages, which increased the number of injuries.
"We did not know if it was a bomb and people started screaming and were very scared," Lidia Garcia, who was travelling in the first carriage of the train, was quoted by Catalan daily El Periodico as saying.
"At the moment of impact I had the feeling of experiencing an earthquake. People were swaying back and forth and colliding into each other," Garcia told rival Catalan newspaper La Vanguardia.
"Many people fell to the ground because people were standing up and I saw several people with cuts to the head and face from the blows they suffered when they fell."
Pictures from the scene posted on social media showed the train's interior covered in shattered glass.
Others showed paramedics treating injured commuters sitting on the platform and loading them on stretchers into ambulances.
Data recorder retrieved
The train did not brake when entering the station, a security guard who works at the station, who declined to give his name because he was not authorised to talk to the media, told AFP.
"It was going at normal speed, it did not brake and it crashed into an iron pillar," he said.
The front of the train was crumpled by the impact. Officials covered the damaged front in blue plastic, TV images showed.
An investigation into the cause of the accident has been opened, the spokesman for Renfe said.
The accident coincided with the start of a national rail strike which forced the cancellation of hundreds of trains.
The regional Catalan police force, the Mossos d'Esquadra, said they had recovered the train's data recorder.
The 31-year-old driver had seven years of experience driving trains in Catalonia, Public Works Minister Inigo de la Serna told reporters at the scene.
"He is one of the injured with a strong bruise to the chest," he said.
The train underwent maintenance work on July 18, the minister said. Barriers meant to ensure that the train respects speed limits appear to have worked, he added.
Prime Minister Mariano Rajoy called the head of the separatist Catalan regional government, Carles Puigdemont, to discuss the accident.
The two man have clashed recently over Catalonia's plans to hold an independence referendum on October 1 which Madrid argues is illegal.
The accident comes as Spain this week marked the fourth anniversary of one of the country's worst rail disasters in which 80 people died on July 24, 2013 near the northwestern city of Santiago de Compostela.
The train from Madrid crashed as it hurtled round a sharp bend at 179 kilometres per hour -- more than twice the speed limit for that stretch of track -- in the village of Angrois.