The Royal Engineers have laid 450 metres of new track, replaced the Swale Bridge and relaid the Wensley level crossing to allow it to open to traffic again - in just three weeks.
The work would have taken Network Rail or a private sector contractor between four and six months and cost around £250,000 - but the bill for the heritage railway instead came to £38,000.
The arrangement with the Ministry of Defence came about when the 507 Specialist Team from the regiment required a 'real world' scenario that would enable them to replicate battlefield conditions in which they would be expected to repair damaged railways swiftly to allow transport of military equipment.
It is the first time the Royal Engineers have operated on the mainline network for 55 years, and work on the stretch from Northallerton to the loading ramp at Redmire - which is used for trains carrying armoured vehicles to and from Catterick Garrison - was completed earlier this month.
The relationship proved so mutually beneficial that the regiment are even in talks with Wensleydale Railway directors to return next summer and install a bridge that would link the current terminus of the line to Castle Bolton, where a private station still exists on the Orde-Powlett family's land near the castle, a major visitor attraction. The original bridge was lifted when the line closed in the 1950s.
Many of the officers involved in Exercise Turnout were reservists who hold civilian roles with Network Rail.
Wensleydale Railway chair Guy Loverage said: "It came about because the Army are revamping their railway capabilities under reservistis - many of the officers work for Network Rail.
"It was an easy win for us. It would have taken us the best part of a decade to get the money together to pay Network Rail to do the work. They did it in three weeks with 67 soldiers. In the commercial sector, it could easily have taken six months as they bill per man.
"The trains had stopped running due to Covid anyway, so we thought it was a good time to look at the track and get stuck in. We would love to work with them again and are in discussions about them coming back next year.
"There needs to be a tactical imperative for them, such as a scenario when insurgents have mined a line. They liked the idea of building a new bridge from Redmire to Castle Bolton as it's another real world scenario - rapid bridge construction - and they won't have to 'sweep up' after themselves. It would be permanent and allow us to run an extra half a mile to Castle Bolton, and possibly lay the way to opening up further expansion to Aysgarth, Askrigg and Hawes (former stations on a stretch of the line which has not been reinstated since closure).
"The station is still there and owned by the Lords Bolton, who had it built for their use - there is even a private waiting room.
"I would like to thank everyone who donated to the appeal to raise the money we needed. We haven't earned a penny since February and one benefactor gave us £10,000 towards this project."