Rail enthusiasts have turned out in force to see Flying Scotsman as the locomotive marks its return to Scotland with trips in the Borders, Midlothian and Fife.

The famous steam engine left Edinburgh's Waverley station shortly before 11am on Sunday, where officials estimated 800 people turned out to see the engine depart for Tweedbank in the Borders.

Hundreds more lined the route in parts and congregated at places such as Galashiels and Tweedbank to get a closer look at the locomotive.

It is due to cross the Forth Bridge later.

Flying Scotsman was allowed to take to the tracks after Network Rail reversed a decision to cancel trips at short notice.

The track operator said on Friday night that the locomotive would no longer be able to make the planned tours because it had not been able to carry out safety assessments on some lines.

The decision dismayed hundreds of rail enthusiasts planning to see the recently refurbished steam engine, and after an outcry led by Scotland's Transport Minister Derek Mackay, Network Rail reversed its position and said checks had been carried out overnight to allow the train to take to the track.

The engine arrived at Waverley to fanfare on Saturday evening.

Network Rail chief executive Mark Carne offered a "wholehearted and sincere apology" for the earlier cancellation which Mr Mackay described as a "debacle".

An investigation is still to take place into the reasons for the premature cancellation.

Built in Doncaster, South Yorkshire, in 1923, Flying Scotsman pulled 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.