A train driver suspected of causing Spain's worst train disaster for decades has has been formally accused of reckless homicide, the country's Interior Minister said.
Investigators are looking into possible failings by 52-year-old Francisco Jose Garzon Amo after the Madrid to Ferrol service derailed on Wednesday night as it approached the city of Santiago de Compostela.
He has now left hospital after receiving treatment for chest trauma and been taken to a police station, but has so far refused to answer officers' questions and is expected to be interrogated by a judge.
Francisco Jose Garzon Amo (centre) being helped from the crash site
Visiting Santiago, Interior Minister Jorge Fernandez Diaz said there were "reasonable grounds to think he (Garzon Amo) may have a potential liability".
"He has been detained since 7:40pm on Thursday for the alleged crime of reckless homicide," Fernandez Diaz said.
The president of the autonomous region of Galicia, Alberto Nunez Feijoo said forensic science units hoped to name three of the 78 victims who have not yet been identified in the next three days.
Story continues after slideshow...
Nunez-Feijoo also said a public funeral for the 78 dead would be held at Santiago cathedral on Monday at 7pm local time.
One Briton was among the 168 injured passengers, while 30 people are still believed to be in a critical condition.
In addition to people from all over Spain, nationals from the United States, Mexico and Algeria are believed to be among the dead.
Authorities are in possession of the train's so-called "black box", which is expected to shed further light on the cause of the disaster.
Adif, Spain's railway agency, confirmed that a high-tech automatic braking programme was installed on the track for most of the journey but stops just five kilometres (three miles) south of where the crash occurred.
From that point on the driver has sole control of the brakes.
"Regardless of the system in place, the drivers know the speed limits. If these are respected, an accident should not take place," a spokeswoman said.
Early indications suggested the train was travelling at around 118mph - more than twice the 50mph speed limit - when it crashed while heading into a curve.
Gonzalo Ferre, president of Adif, said the driver should have started slowing the train four kilometres (2.5 miles) before reaching a dangerous bend that train drivers had been told to respect.
"Four kilometres before the accident happened he already had warnings that he had to begin slowing his speed, because as soon as he exits the tunnel he needs to be travelling at 80 kilometres per hour," Ferre said.
According to reports in the Spanish media, after realising the magnitude of the disaster Amo said: "I f***** up, I want to die."
In March 2012, the 30-year employee of Spanish train operator Renfe allegedly posted boasts on Facebook about how fast he was driving a train and joked about racing past police.
He is believed to have taken control of the train from a second driver about 65 miles south of Santiago.
Wednesday's train crash is the worst Spain has experienced since a three-train accident in a tunnel in the northern Leon province in 1944.
The latest incident comes less than two weeks after six people were killed and scores injured in a train crash just south of Paris.