Transport police in Kirkcaldy are warning people to stay away from Fife's train tracks following three dangerous incidents in the area.
Officers say on one occasion wood and slabs were dumped on rail routes near Dunfermline Town station, while in another a train struck a wheelbarrow.
Just a couple of weeks ago a train driver on the busy Inverness to Edinburgh morning service reported a near miss of a dog walker near Springfield.
Police are warning interfering with tracks puts staff and passengers in grave danger, and trespassing can be fatal.
Sergeant Derek Elder said: “These are all very dangerous incidents and I am thankful there weren’t more serious consequences.
"Trespassing in itself can pose grave danger to the reckless individuals involved.
"Railway lines are operational 24 hours a day and trespassing at any time of day can easily prove fatal.
"Throwing objects onto the tracks also puts both passengers and staff at significant risk, not to mention the thousands it can cost in repairs to trains and railway infrastructure.
"Likewise, not taking due care and attention at level crossings is of serious concern, and this man was lucky he wasn't injured, or even worse killed."