London 2012: Flying Scotsman ride for flame in Olympic Torch Relay
The 2012 Olympic torch will take two rail trips on its journey through North Yorkshire next year.
The procession will visit 20 places in the county between 18 June and 20 June, it has been announced.
There will be celebratory events in York on 19 June, when the torch stays in the city overnight.
The Olympic flame will be carried in a mix of torches and lanterns when it travels on the Flying Scotsman and the North Yorkshire Moors Railway.
The Flying Scotsman will take the flame from York to Thirsk on 20 June.
Repairs to the locomotive's chassis are currently taking place. The work is expected to be complete by next spring.
York's National Railway Museum, which owns the Flying Scotsman, said it was "thrilled" to be involved in the Olympic celebrations.
Director Steve Davies said: "The London 2012 Olympic Games will be an event the whole country can be proud of and we're so pleased that Flying Scotsman, another great source of pride for Britain, will be involved in this spectacular occasion."
The flame will be carried from Whitby to Pickering on board the North Yorkshire Moors Railway on 18 June, the day it makes its first appearance in Yorkshire.
General manager Philip Benham said he was "delighted" the railway was taking part in the Torch Relay.
He said: "It will bring some focus not only on us but on North Yorkshire and the attractions of North Yorkshire."
Mr Benham said he hoped to involve local people in the event to make it a "community celebration".
Thousands of torchbearers are being recruited for the flame's 70-day journey across the UK before the opening ceremony in London.
The Olympic flame will arrive in the UK from Greece on 18 May 2012.
The relay will begin at Land's End, Cornwall, on Saturday, 19 May and end on Friday, 27 July in the Olympic Stadium.
It is estimated it will be carried 8,000 miles.