Transport police have issued urgent warnings after children as young as five were spotted playing on rail tracks.
In one incident two boys aged around 10 avoided being hit by a high-speed train at Wester Hailes station in Edinburgh by just a few seconds.
Children aged between five and 11 have been seen running across the railway line and jumping off platforms at the same station in recent weeks, British Transport Police (BTP) said.
Officers have now increased patrols in the area and visited local schools to raise awareness of the potentially fatal consequences of trespassing on the railway.
Constable Niall Bonnar said: "Children, mostly young boys, have been captured on CCTV running between the platforms at the station, and astonishingly back again, as well as walking off the end of the platforms.
"The real dangers of trespassing have been highlighted by these recent incidents and as well as being extremely dangerous and illegal, there is the distinct possibility that services will be delayed as a consequence.
"Trespassers also need to be aware that there are 25,000 volts passing through overhead power lines.
"This is more than enough to kill and you don't even need to touch the cables to be electrocuted as the electricity can arc up to several feet."
ScotRail said it "fully supports" the efforts of BTP to reduce trespassing.
Mr Bonnar added: "It is enormously worrying that primary-age children are putting themselves in grave danger by trespassing.
"The children seem to be oblivious to the risks that trespassing and playing near the railway presents.
"They also seriously endanger the safety of others working and travelling on the railway, and the foolishness of their actions cannot be underestimated."
Police are also urging parents to be aware of the dangers on the railway.
Mr Bonnar said: "Please make sure your children are aware that the railway is an incredibly dangerous environment and remind them to stay away from the rail network.
"Those children seen trespassing may believe they can cross the tracks before a train comes, however all it takes is for them to accidentally slip and they will not be able to get out of the way in time.
"Children need to understand that what may seem to them as a shortcut may actually cut their life short."
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article