A train hurtled off the tracks in northwest Spain killing at least 77 passengers and injuring more than 140, an official said Thursday, with the driver reportedly going at twice the speed limit.
Carriages piled into each other and overturned in the smash late Wednesday, smoke billowing from the wreckage, as bodies were lain out under blankets along the tracks in the country's deadliest rail disaster in more than 40 years.
Several media outlets said the train was speeding at the time of the accident but a spokesman for state railway company Renfe said it was too soon to say what caused the accident.
"There is an investigation underway and we have to wait. We will know what the speed is very soon when we consult the train's black box," a Renfe spokesman said.
The driver became trapped in one of the carriages and he told railway officials by radio that he took the bend at 190 kilometres (118 miles) per hour in an urban zone with a speed limit of 80 kph, daily El Pais reported.
"I was going at 190! I hope no one died because it will weigh on my conscience," he said, according to the online edition of the newspaper which cited unidentified investigation sources.
The accident happened at 8:42 pm (1842 GMT) on Wednesday as the train carrying 218 passengers and four staff was about to enter Santiago de Compostela station in the northwestern region of Galicia.
The train derailed on a stretch of high-speed track about four kilometres (2.5 miles) from the train station in the city, the destination of the famous El Camino de Santiago pilgrimage which has been followed by Christians since the Middle Ages.
The train was the Alvia model which is able to adapt between high-speed and normal tracks.
It had left Madrid and was heading for the ship-building coastal town of Ferrol as the Galicia region was preparing celebrations in honour of its patron saint James.
Prime Minister Mariano Rajoy, a native of Santiago de Compostela, arrived at the scene of the accident and was also due to visit victims in hospital later on Thursday.
Spain's King Juan Carlos and Crown Prince Felipe called off their public engagements out of respect for the victims while Spain declared seven days of mourning in Galicia.
Several witnesses spoke of a loud explosion at the time of the accident.
"I was at home and I heard something like a clap of thunder, It was very loud and there was lots of smoke," said 62-year-old Maria Teresa Ramos, who lived just metres from where the accident happened.
"It's a disaster, people are crying out. Nobody has ever seen anything like this," she added.
Rescue workers recovered 73 bodies from the train's wreckage and four more victims died later in hospital, a spokesman for the Galicia high court said.
A total of 143 people were said to have various injuries.
It marks the worst rail accident in Spain since 77 people were killed in 1972 in a derailment in Andalusia in the south.
In 1944, hundreds were killed in a crash also between Madrid and Galicia.
Renfe said the train had no technical problems and had just passed an inspection.
Francisco Otero, 39, who was inside his parents' home just beside the section of the track where the accident happened, said he "heard a huge bang".
"The first thing I saw was the body of a woman. I had never seen a corpse before. But above all what caught my attention was that there was a lot of silence, some smoke and a small fire," he told AFP.
"My neighbours tried to pull out people who were trapped inside the carriages with the help of pickaxes and sledgehammers and they eventually got them out with a hand saw. It was unreal."
Emergency services workers in red jackets tended to injured passengers lying on a patch of grass as ambulance sirens wailed in the background.
"There are bodies laying on the railway track. It's a Dante-esque scene," Alberto Nunez Feijoo, president of the regional government, told news radio Cadena Ser.
Pope Francis called for prayers for the victims.
The town hall of Santiago de Compostela called off concerts and firework displays that had been planned as part of the festivities in honour of its patron saint.
The accident in Spain marks the third large rail disaster this month after six people died in a passenger train derailment near Paris on July 12, and 47 were killed when an oil train derailed and exploded in Canada on July 6.
French President Francois Hollande expressed his "complete solidarity with Spain after the horrifying rail catastrophe", saying in a statement that he shared in the grief of the victims' families.