A man who had been drinking and was late for his connection leapt onto a moving train as it left Huddersfield Railway Station.
James Milnes, 39, of Manchester Road, Linthwaite, is a serving prisoner and appeared by video link at Kirklees Magistrates’ Court.
Prosecutor, Alex Bozman, said obstructing an engine was a ‘novel’ offence for which it appeared there were no sentencing guidelines.
He said: “The circumstances are that this occurred on the evening of October 14, 2015, and involved the Huddersfield to Manchester Victoria service.
“It appears he was under the influence of alcohol and jumped from Platform Four onto the moving train.
“Fortunately the train guard noticed what happened and the emergency stopping procedure was put in place. He was recovered from the track. The train had to return to Huddersfield and the financial impact was £924.86.
“Interviewed he said he had done it on impulse and regretted it.”
The defendant pleaded guilty to the charge and his solicitor, Cheryl Ford, said: “He had had a drink. He was late for his train. If he had missed it he would have had to wait for another hour for the next service.”
She added: “He described it as a ‘stupid action’ and he is obviously sorry for what he did.”
The court heard he had recently been convicted of affray and had been given a 12 month sentence at Leeds Crown Court. He is due to be released on September 28.
Sentencing him, Kashmir Khangura, chairman of the bench, said: “Mr Milnes, what were you thinking? You could have killed someone. You could have killed yourself. Mr Milnes, don’t try anything like that again.”
He imposed a four-week custodial sentence but explained that given he is already serving a sentence it would not affect his release date. A court surchage of £80 would be payable on his release on September 28.