“The driver said he had finished his work shift and there was no substitute, so he stopped the train and got off,” a spokesman for the Civil Guard police force said.

One of the 109 abandoned passengers said they were told the train had stopped for technical reasons.

"Then 15 minutes later they said the driver had decided to stop because he had gone over his limit," the passenger told local newspaper El Diario Montañés.

While some people travelling to nearby locations managed to scramble onto buses, most had to wait until 11.30pm for a replacement bus service to travel the remaining 200 miles to Madrid.