Spanish police say they have arrested the driver of a speeding train that crashed Wednesday, killing at least 78 people.
Authorities said Saturday that they are investigating Francisco José Garzón Amo on charges of criminal recklessness.
The 52-year-old driver was detained Friday in the hospital where he is recovering from injuries he sustained in the crash.
Reports say the train may have been traveling more than twice the 80-kilometer-per-hour speed limit when it rounded a curve outside the northwestern city of Santiago de Compostela and derailed.
Authorities will learn more from the data recorded by the train's "black box," which investigators now have in their possession.
Spain's state train company, Renfe, says Garzón is a 30-year company veteran with more than a decade of train driving experience.
Spanish media report the driver bragged about speeding online, with one post on his now-deleted Facebook page featuring a picture of a train speedometer at 200 kilometers per hour and a comment by Garzón, saying "I am on the edge, I can't go faster or else I will be fined."
Spanish authorities have opened two investigations into the derailment - one by judicial authorities and another by the public works department.
Security camera footage shows the train traveling Wednesday night from Madrid to the port of Ferrol, slamming into a concrete wall at the side of the track, its first car overturning.
More than 140 people were injured in the crash, and with some remains still unidentified, authorities say the death toll could change.
The accident is one of the deadliest train crashes in Spanish history. In 1944, three trains collided in a tunnel, killing hundreds. In 1972, as many as 86 people died in a crash in the country's southwest.
On Thursday, Spanish Prime Minister Mariano Rajoy, who was born in Santiago de Compostela, visited the crash site and the hospital where many of the injured are being treated. He declared three days of mourning to honor the victims.
Recovery teams used cranes Thursday to move the train cars from the scene of the derailment.
The disaster happened on the eve of an annual festival dedicated to Saint James, one of Jesus' disciples, whose remains are said to rest in Santiago'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 and has had a resurgence in popularity in recent decades.