"I can't explain. I still don't understand," the driver Francisco Jose Garzon Amo told the judge when asked why he hadn't slowed down in time to take a sharp bend near the northwestern city of Santiago de Compostela.
Asked again about what caused him to crash, he added: "I tell you sincerely that I don't know. Otherwise I would not have been so crazy as not to brake" earlier.
His testimony made during a closed-door hearing on Sunday was recorded and an extract posted online by leading newspaper El Pais.
Judge Luis Alaez released Garzon on bail charged with 79 counts of reckless homicide after the initial hearing, while the court investigates.
Railway officials say the track where the train crashed was not equipped with automatic braking systems in place on some high-speed lines and that it was therefore left up to the driver to brake.
The driver told the judge he had braked, but by the time he did so the crash was "inevitable".
"Before the train turned over, I had activated everything but I saw that no, no, it wasn't working."
The black box data recorders revealed the train was going at 192 kilometres (119 miles) per hour before braking shortly before the bend. It was travelling
at 153 kph — about twice the 80 kph speed limit on that part of the rail — when it derailed.
The court said the data recorders revealed that when the train crashed Garzon was on the phone to the state rail company Renfe which was giving him instructions for later on in the route.
With 79 people killed and 178 injured, it was Spain's worst rail disaster since 1944.