A fed-up Spanish train driver has left 109 passengers stranded after he refused to work overtime and stopped some 300km away from their destination.

The train was making its way from the northern coastline to the capital of Madrid when it suddenly stopped at the village of Osorno at 9.15pm, two hours into the journey.

Initially the confused passengers were told the halt was caused by technical problems but about 15 minutes later the truth filtered through the carriages.

"They said the engineer had decided to stop because he had finished his workday and did not want to risk having an accident by excessive hours," one of the passengers told El Diario Mantanes .

The only train conductor was left with the hour-long task of informing customers a bus would have to come and take them the rest of the way to Madrid.

The bus to Madrid did not arrive until 11.30pm.

A spokesman for the Semaf rail workers’ union said the driver asked for another engineer to travel on board to be their relief.

“They should have had a substitute driver lined up but it didn’t happen. We’ve seen similar things in the past.”