The Spanish judge investigating the train crash near Santiago de Compostela, in which 79 people were killed, has provisionally charged the driver with multiple cases of reckless homicide.
Francisco Jose Garzon Amo has, however, been released from police custody under certain conditions following a special court hearing last night.
Mr Garzon was taken in handcuffs from Santiago police headquarters to the court, where he gave his first detailed account about what went wrong last Wednesday leading to the crash.
The court service disclosed he was questioned for two hours by the investigating judge.
According to Spanish newspaper, El Pais, Mr Garzon was said to have admitted to reckless behaviour at the hearing.
Shortly after midnight, Mr Garzon was released from police custody but chose to leave the court in the back of a police car.
It is a conditional release in which he must surrender his passport and return to the court once a week.
Local media reports have quoted Mr Garzon saying in the aftermath of the crash that the train was travelling at more than twice the speed limit.
Spain is to hold a memorial service later today for the 79 victims of what was the country's worst rail disaster in decades.
The ceremony will take place this evening in the famous cathedral of Santiago de Compostela.
Prime Minister Mariano Rajoy, several ministers and the King's children Prince Felipe and Infanta Elena will attend.