The driver of the train that crashed near the Spanish city of Santiago de Compostela, killing 79 people, has been provisionally charged with multiple cases of reckless homicide.
Francisco Jose Garzon Amo, 52, appeared before a judge at a closed hearing on Sunday.
The train was travelling on an express route between the capital, Madrid, and the port of Ferrol, with 218 passengers and four crew when it crashed last Wednesday night about 8.40pm (local time).
The driver was arrested shortly after the crash and is suspected of driving too fast on a bend. Reports say the train was travelling at more than double the speed limit at the time of the crash.
In a statement, the High Court of Galicia said Mr Garzon had been released but must report to a court every week and has surrendered his passport to a judge, the BBC reports.
Mr Amo's testimony lasted two hours and he has also banned from driving trains for six months.
Reports say the train was travelling at more than double the speed limit at the time of the crash.
The death toll has risen to 79 after an American died on Sunday. At least 130 people were injured.
Driver said he could not brake - witness
A witness says the train driver of a train told him minutes after the crash that he was going fast and could not brake.
Resident Evaristo Iglesias of Angrois near Santiago de Compostela said he spoke to Mr Garzon as he accompanied him to a place where other injured people were being laid out.
''He said he had to brake to 80 (km per hour) and couldn't, that he was going fast," Mr Iglesias told Antena 3 TV.
"He kept saying 'I want to die! I want to die! I don't want to see this! I want to die!'. This is what he kept repeating."
Pictures taken after the crash showed Mr Iglesias and another man accompanying the driver, who was bleeding heavily from a gash to his head, away from the scene.
El Pais newspaper reported that Mr Garzon told railway officials by radio the train had taken the curve at 190km/h - more than double the 80km/h speed limit for that section of track.
A passenger on the train said just before the crash the display panel in her carriage showed it was travelling at 200km/h.
"We just came out of a tunnel and my boyfriend told me: 'We are going at 200km an hour'. So I looked and it was true," Carla Serrano told public television TVE.
Julio Gomez-Pomar, the president of state train service Renfe, has said the train had no technical problems. It had received a full maintenance check on the morning of the journey and security systems were in good shape.
"As far as we know the train was in perfect condition when it set off on its journey," he told Spanish newspaper ABC.