The boy, who is eleven years old, was found walking barefoot between Jönköping and Värnamo in central Sweden on Friday afternoon, according to Sveriges Radio (SR).
“Train drivers sounded the alarm on the line between Jönköping and Värnamo after seeing a boy walking in front of the train,” said Göran Gunnarsson of the Ekeryd police to SR.
Train travellers who wanted to get off the train to help the boy were prevented from doing so by train staff members, who explained that it was against regulations to open the train doors mid-route.
In addition, train staff were unable to get the 11-year-old's attention.
One of the passengers was told that the train doors could not be opened while the train was in motion.
The boy allegedly threw stones at the moving train and occasionally became so tired that he sat on the tracks and rested while the train waited.
It was more than 50 minutes after the alarm was raised that the boy was safely taken off the tracks.
Police claim the rescue took so long due to the inaccessibility of the particular stretch of tracks where the boy was found, telling SR that no roads lead to anywhere near that stretch.
The boy had left an outing with his family and somehow found his way up onto the rails, according to SR.
Passengers complained that it was “terrible” that they weren't allowed to help, yet the county transport authority Länstrafiken has stood by decision, claiming personnel on the train acted appropriately.
“It's forbidden to let out travelers on the tracks due to the risk of accidents. Especially when the matter concerns a person who is disabled. Luckily, nothing happened,” said Carl-Johan Sjöberg of the regional train operator Länstrafiken to SR.