Train-spotters are expected to be out in force this weekend as Flying Scotsman makes its first trip to Scotland for more than a decade.
The world-famous locomotive is making a much-anticipated tour following a multimillion-pound restoration.
Rail enthusiasts are expected to line the tracks in their hundreds to catch a glimpse of the steam engine, but they have been warned not to jeopardise their safety or that of others.
British Transport Police said anyone caught trespassing risks a criminal record and fine.
Flying Scotsman will pull into Edinburgh Waverley on Saturday night before heading south to Tweedbank on the new Borders Railway on Sunday morning.
That evening, the locomotive will head across the Forth Bridge and is scheduled to go on public display at the Bo'ness and Kinneil Railway on Monday.
Tourism body VisitScotland is encouraging passengers to take in some other sights on the tour, including the Royal Yacht Britannia, the Kelpies and the Falkirk Wheel.
Phil Verster, managing director of ScotRail Alliance, said: "The Flying Scotsman is a world-famous locomotive with a loyal and enthusiastic following, and its first trip to Scotland for 16 years is a great opportunity to demonstrate what Scotland has to offer.
"As well as providing another unparalleled opportunity to showcase the newly opened Borders Railway, passengers on board the train will be able to enjoy the breathtaking clifftop views along the East Coast Main Line, the picturesque beauty of the Fife coast, and majesty of the Forth Bridge."
Built in Doncaster, South Yorkshire, in 1923, Flying Scotsman soon became the star locomotive of the British railway system, pulling the first train to break the 100mph barrier in 1934.
The National Railway Museum in York bought the locomotive for £2.3 million in 2004 before work got under way on its decade-long restoration two years later.
Network Rail was forced to pay out almost £60,000 in compensation when dozens of train services were delayed by people encroaching on the track during the refurbished train's inaugural run from London to York on February 2 this year.
Alex Sharkey, ScotRail Alliance area director for the east of Scotland, said: "It is extremely dangerous and illegal for the public to trespass on the railway.
"During the trips to the Borders and Fife, we will continue to operate a full passenger service with hundreds of other trains running on these lines throughout the time Flying Scotsman is in Scotland.
"Those who plan to enjoy seeing the steam engine in the coming days must do so from a safe position and must not enter the operational railway under any circumstances.
"For safety reasons, we will also be limiting access to some of our stations and platforms while the train is passing through to make sure regular travellers can still use the railway and to manage the risk of overcrowding."
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 here