The £520,000 scheme will see the return to passenger service of the oldest surviving “Black Five” class locomotive after an absence of 28 years.
It is due to haul trains again on the ten-mile heritage line to Broomhill, near Nethy Bridge, next month.
Its owners said the engine was the “oldest and best example of a London Midland and Scottish Black Five”.
The engine is similar to those which haul the summer Jacobite service between Fort William and Mallaig.
The WEC Watkinson Trust, 5025’s owner, praised the “skill and many hours of hard work” by the Strathspey Railway’s engineering staff and volunteers.
Chairman Neil Sinclair said: “This has been the most significant engineering work carried out on a locomotive in the Highlands since Lochgorm Works in Inverness was confined to light repairs in 1929.
"5025 hauling trains again on the Strathspey Railway is also a major event in railway history.
"It means that passengers in the Highlands will be able to travel behind a member of the Black Five class which dominated the working of trains in the region
from 1934 (when 5025 itself first worked here) for almost 30 years.
"The engine is also a link with the end of an era on British Railways as it was one of the last steam locomotives to be withdrawn in 1968.”
The locomotive survived one of the first fatal rail crashes after the outbreak of the Second World War when it collided with another train at Bletchley in Buckinghamshire in October 1939.
LMS 5025 was hauling a London to Stranraer passenger express which crashed into an Inverness train, killing five people and injuring more than 30 others.
The restoration project included a major rebuild of the boiler, two new cylinders and the construction of a new tender tank at Riley Engineering in Bury.
Funding came from the Strathspey Railway Company, the Strathspey Railway Trust, the Heritage Lottery Fund, the Strathspey Railway Association and a “significant” amount raised from supporters though appeals.
It had been hoped to return the engine to service in 2015 but the scale of work required extended the timescale while funding was raised.
The trust said: “Due to a very tight budget, the original intention was to return 5025 to traffic by carrying out the minimum necessary work.
"However, she is an iconic locomotive and quite early on the sensible decision was taken to restore her to ‘as new’ condition.
"This has resulted in considerable extra work and expense and had left the Watkinson Trust desperate for funds.
"We were heavily delayed waiting for the boiler.
“This has put the completion date back to around summer 2020.
"Owing to the covid lockdown, this has been further delayed, with completion date postponed to summer 2021.
"The original budget of £354,050 has been spent wisely and with care.
"However, additional boiler work has cost a further £39,345, new cylinders and frame repairs £33,350, and other work such as a new cab, injectors and super heaters upwards of £22,500.”
Completion of this work led to the locomotive moving under its steam in May for the first time since 1993.