Eight trespassers were caught on the railway lines as Flying Scotsman made its historic visit to Scotland.
British Transport Police (BTP) confirmed four of the rail enthusiasts had been detected in Fife near Glenrothes station.
A spokesman for the force said: “Around 8.15pm on Sunday three men aged 28, 34 and 54 and a 33-year-old woman were found on the line between South Gyle and Dalmeny stations. A short time later, around 8.25pm, two men aged 39 and 41 and two women aged 39 and 42 years trespassed in the vicinity of Glenrothes station.”
Despite the dangerous incidents, officers were quick to praise the overall behaviour of trainspotters during the tour of the refurbished engine.
Chief Superintendent John McBride, divisional commander for BTP in Scotland thanked the tens of thousands of people who flocked to see the iconic steamer for heeding safety advice and warnings about trespassing.
He said: “The return of Flying Scotsman was a true spectacle and I want to thank all those people who lined the route and stations to see it as it passed.
“In the main our earlier advice and warnings about not straying on the line to view it were heeded.
“Our officers worked tirelessly with our rail industry partners to ensure the day’s events passed with out any real incident of note.
“It was a truly memorable day for many and I look forward to its return in the future.”
Flying Scotsman toured the Borders Railway and Fife Circle after being restored at a cost of more than £4 million.