The driver of the LNER train - which was not schedule to stop at Headingley - stopped in plenty of time after seeing a topless man.
-> Mother makes desperate appeal for the public's help to find her 'vulnerable' missing daughterLouisa Wade was on the 7.52am Horsforth to Leeds service when the train came to a halt just outside Headingley station.
She said: "I was stood next to the window, after about 15 minutes we were informed the driver had noticed someone on the tracks and the police had been called.
"I could see the man on the tracks myself when I looked out of the window. He looked distressed was shouting.
"The police arrived and they were speaking with him for just over an hour, whilst he was pacing around the tracks. The man disappeared for about 15 minutes, but was eventually found.
"He was brought on to the train and dropped off at Headingley station and put into the back of a police van."
She added: "Shout out to driver of the train - it wasn’t scheduled to stop at Headingley and should have been going at a high speed. If he hadn’t have noticed the guy on the track it would have ended tragically."
-> Next stage of flood defence “to avoid £400m of potential damage” to go before Leeds decision-makersServices on the Harrogate line were severly disrupted throughout the morning rush hour.
Train operator Northern said all services were back to normal by 10.20am.
A British Transport Police spokesman said: "At 7.46am we were called to reports of a trespasser on the tracks close to Leeds.
"Officers attended and a man has been taken to a place of safety."