Dramatic footage has emerged of the moment a Spanish train crashed, killing at least 80 people, as police placed the driver under investigation.
The train derailed and caught fire when it hit a sharp bend at speed near the pilgrimage centre of Santiago de Compostela, in one of Europe's worst rail disasters.
The crash was caused by excessive speed, an official source with knowledge of the accident investigation told Reuters.
The video footage from a security camera outside the northwestern city showed the train, with 247 people on board, hurtling into a concrete wall at the side of the track as carriages jack-knifed and the engine overturned.
One local official described the aftermath of the crash, on the eve of one of Europe's biggest Christian festivals in the ancient city, as like a scene from hell, with bodies strewn next to the tracks.
The impact was so huge one carriage flew several metres into the air and landed on the other side of the high concrete barrier.
"We heard a massive noise and we went down the tracks. I helped get a few injured and bodies out of the train. I went into one of the cars but I'd rather not tell you what I saw there," Ricardo Martinez, a 47-year old baker from Santiago de Compostela, told Reuters.
The train driver was under formal police investigation, a spokeswoman for Galicia's Supreme Court told Reuters, without naming him. The train had two drivers and one was in hospital, the Galicia government said.
It was not immediately clear which driver was under investigation or in hospital. The train, operated by state-owned company Renfe, was built by Bombardier and Talgo and was around five years old. It had almost the maximum number of passengers.
DRIVER'S FACEBOOK SPEED BOAST
Newspaper accounts cited witnesses as saying one driver, Francisco Jose Garzon, who had helped rescue victims, shouted into a phone: "I've derailed! What do I do?".
The 52-year-old had been a train driver for 30 years, a Renfe spokeswoman said. Many newspapers published excerpts from his Facebook account where he was reported to have boasted of driving trains at high speed. The page was taken offline on Thursday and the reports could not be verified.
El Pais newspaper said one of the drivers told the railway station by radio after being trapped in his cabin that the train entered the bend at 190 kilometres per hour. An official source said the speed limit on that stretch of twin track, laid in 2011, was 80 kmh.
"We're only human! We're only human!" the driver told the station, the newspaper said, citing sources close to the investigation. "I hope there are no dead, because this will fall on my conscience."
Investigators were trying to urgently establish why the train was going so fast and why failsafe security devices to keep speed within permitted limits had not worked.
Spain's rail safety record is better than the European average, ranking 18th out of 27 countries in terms of railway deaths per kilometres travelled, the European Railway Agency said. There were 218 train accidents in Spain between 2008-2011, well below the European Union average of 426 for the same period, the agency said.
Cranes were still pulling out mangled debris on Thursday morning (local time), 12 hours after the crash. Emergency workers had stopped their search for survivors, the court spokeswoman said.
Firefighters called off a strike to help with the disaster, while hospital staff, many operating on reduced salaries because of spending cuts in recession-hit Spain, worked overtime to tend the injured.
The disaster happened at 8.41pm local time on the eve of a major festival dedicated to St James, one of Jesus' 12 disciples, whose remains are said to rest in the city's centuries-old cathedral.
The apostle's shrine is the destination of the famous El Camino de Santiago pilgrimage across the Pyrenees, which has been followed by Christians since the Middle Ages.
The city's tourism board said all festivities, including the traditional High Mass at the cathedral, had been cancelled as the city went into mourning following the crash.
In total, 178 people were taken to hospital after the crash, a regional government spokeswoman said. Of those, 95 were still being treated, of which 36 including four children, were in serious condition, she said.
US citizens were amongst the injured, the US embassy said in a statement and at least one British citizen was wounded, the British embassy spokesman said. Several other nationalities were believed to be among the passengers.
One official source said speeding was a likely cause of the derailment, but the public works minister said it was too early to say exactly what had happened.
One of the train drivers had been sedated, said Juan Jesus Garcia, the secretary general of the Renfe train drivers union, adding he hoped to visit him today.
Neighbours ran to the site to help emergency workers tend to the wounded. Ana Taboada, a 29-year-old hospital worker, was one of the first on the scene.
"When the dust lifted I saw corpses. I didn't make it down to the track, because I was helping the passengers that were coming up the embankment," she told Reuters. "I saw a man trying to break a window with a stone to help those inside get out."
Prime Minister Mariano Rajoy, who was born in Santiago de Compostela, the capital of Galicia region, visited the site and the main hospital today. He declared three days of official national mourning for the victims of the disaster.
Passenger Ricardo Montesco told Cadena Ser radio station the train approached the curve at high speed, twisted and wagons piled up one on top of the other.
"A lot of people were squashed on the bottom. We tried to squeeze out of the bottom of the wagons to get out and we realised the train was burning. ... I was in the second wagon and there was fire. ... I saw corpses," he said.
Both Renfe and state-owned Adif, which is in charge of the tracks, had opened an investigation into the cause of the derailment, Renfe said.
The official source said no statement would be made regarding the cause until the black boxes of the train were examined.
Clinics in Santiago de Compostela were overwhelmed with people flocking to give blood, while hotels organised free rooms for relatives. Madrid sent forensic scientists and hospital staff to the scene on special flights.
The train, with eight passenger carriages, was travelling from Madrid to Ferrol on the Galician coast when it derailed, Renfe said in a statement. The train left Madrid on time and was travelling on schedule, a spokeswoman said.
Allianz Seguros, owned by Germany's Allianz, owns the insurance contract for loss suffered by Renfe passengers, a company spokeswoman told Reuters. The contract does not cover Renfe's trains. The company had sent experts to the scene, she said.
The disaster stirred memories of a train bombing in Madrid in 2004, carried out by Islamist militants, that killed 191 people, although officials do not suspect an attack this time.
Spain is struggling to emerge from a long-running recession marked by government-driven austerity to bring its deeply indebted finances into order.
But Adif, the state railways infrastructure company, told Reuters no budget cuts had been implemented on maintenance of the line, which connects La Coruna, Santiago de Compostela and Ourense and was inaugurated in 2011.
It said more than 100 million euros a year were being spent on track maintenance in Spain.
The derailment was one of the worst rail accidents in Europe over the past 25 years.
MAJOR SPAIN RAIL ACCIDENTS
Following is a timeline of some other major accidents on the country's railway lines:
Jan. 3, 1944 - Three trains collide inside a tunnel near the village of Torre del Bierzo in the region of Castile and Leon. While the official death toll was 78, recent studies put the number killed at over 500.
Aug. 9, 1970 - A passenger train travelling from Plencia in the Basque Country collides with a second train, killing 33 people and injuring 200.
July 21, 1972 - A Madrid express train, passing through Seville on its way to the Costa del Sol, collides with a stationary local train carriage at El Cuervo, killing 86 and leaving 112 injured.
March 1, 1977 - At least 22 people are killed and 87 injured after a head on collision between two passenger trains outside Barcelona after the train jumped a red light.
Dec. 15, 1978 - Thirteen people are killed and 14 injured after the last two wagons of a train travelling north from Cadiz, Andalusia, to Madrid derailed at Manzanares.
July 15, 1980 - A collision between a passenger train travelling from Barcelona, in Catalonia, to the capital, Madrid, and a stationary freight train in the station of Torralba del Moral, kills 17 and injures 22.
Sept. 24, 1980 - A passenger train travelling from the Eastern port of Valencia towards Madrid hits a bus on a level crossing near the town of Chirivella, killing 27 people. The train passengers were unhurt.
Nov. 9, 1981 - Eleven people are killed and 35 injured after a passenger train hit a truck parked at a level crossing near the city of Huesca in the region of Aragon.
March 25, 1988 - Outside the town of Juneda, near the Catalan town of Lerida, 10 young children and four teachers are killed and 15 hurt when a train went through a stop signal and hit a school bus.
Aug. 2, 1993 - Twelve people are killed in a tunnel when a passenger train and a goods train collide near Vega de Anzo in the northern province of Asturias.
March 31, 1997 - Eighteen people are killed and 94 injured after a train travelling from Barcelona to Irun on Spain's border with France derailed near Pamplona in the province of Navarre.
June 4, 2003 - At least 22 people are killed when a passenger train travelling to Cartagena from Madrid crashes into the path of an oncoming goods train at Chinchilla.
July 3, 2006 - At least 43 people are killed and more than ten injured after a underground train in the eastern port of Valencia derails.
June 23, 2010 - Twelve people are killed and at least 13 others injured when they are struck by a high speed train travelling between Alicante and Barcelona while crossing the tracks at Castelldefels Playa station.
July 24, 2013 - A train derailed outside the ancient northwestern Spanish city of Santiago de Compostela, killing at least 80 people and injuring around 178 in one of Europe's worst rail disasters.