Flying Scotsman will cross Scotland's Forth Bridge later today after a decision to cancel the trip over safety fears was reversed by rail operators.
Network Rail originally said the famous steam locomotive would not be able to tour the Borders and Fife after it failed to carry out track safety checks in time.
But an outcry led by Scotland's Transport Minister Derek Mackay persuaded Network Rail to reverse its decision and conduct emergency checks overnight to allow the train to take to the track.
The Flying Scotsman prepares to leave Kings Cross station in London
The engine recently underwent a 10-year refit costing £ 4.2m
A row broke out after excursion operators Steam Dreams said Network Rail had known about the trips for months but left work "until the last minute".
:: Flying Scotsman Back On Track After £ 4.2m Refit
Mr Mackay said: "I hope that many people will now get to enjoy the experience of Flying Scotsman returning to Fife, Midlothian and the Borders.
Network Rail chief executive Mark Carne offered a "wholehearted and sincere apology" for the earlier cancellation which Mr Mackay described as a "debacle".
Mr Carne said: "Engineers and analysts have worked hard to find a way to get the necessary safety checks and engineering assessments done.
"I am pleased to say that we have been successful and are now able to reinstate the original planned tours of Flying Scotsman in Scotland on Sunday.
Flying Scotsman
Flying Scotsman pulled the first train to break the 100mph barrier in 1934
:: Trespassers Stop Flying Scotsman In Its Tracks
"I wholeheartedly and sincerely apologise for the consternation caused by the premature announcement yesterday.
"Once the tours have been safely and successfully run, I will be instigating a full investigation into how this problem occurred on our railway in Scotland."
The steam engine arrived at Edinburgh Waverley to fanfare on Saturday evening and will travel on the new Borders Railway today before travelling across the Forth Bridge.
The Flying Scotsman was built in Doncaster in 1923, and soon became the jewel in the crown of the railways, pulling the first train to break the 100mph barrier in 1934.
It was bought by the National Railway Museum for £ 2.3m in 2004 and work started on a 10-year restoration project in 2006 that cost £ 4.2m.
