An 84-year-old man has been taken into protective custody after he was found riding on the connecting cable between two cars of a limited express train, railway officials said Sunday.

The man, a resident of Yakuno, Kyoto Prefecture, apparently suffers from dementia. He was taken into custody Saturday after the train stopped on its way to the western Japan hot-spring resort of Kinosaki, said the officials of West Japan Railway Co.

The man, who was unhurt, took his position on a 10-cm-thick cable between the second and third cars at Shimoyakuno Station and had a free, hourlong ride for about 55 km.

The train, en route from Osaka to the resort in Hyogo Prefecture, sped as fast as 95 km per hour.

"It was very dangerous behavior," a railway official said "It's a miracle he is safe and well."

JR West was alerted to the situation after a passenger on another train spotted the man around 1:20 p.m. as the train stood stationary at Toyooka Station in Hyogo Prefecture on the JR Sanin Line.

Railway officials said the train arrived about 11 minutes later than scheduled at Kinosaki Station.