The LMS Stanier Class 8F 2-8-0 had been chosen by the War Department to be its standard heavy freight locomotive. As a result, 60 were built by the LNER to Railway Executive Committee order between 1943 and 1945. These were considered LMS stock and numbered as such. These were loaned by the REC to the LNER. The LNER subsequently chose to build some of the design for themselves.
Their time in LNER service was short. The LNER quickly took on replacements for them in the form of the WD Austerity 2-8-0, which they classified as Class O7. The on-loan LMS stock 8Fs were returned to the LMS in 1946 and 1947 and in a reversal of the arrangement, the O6s were subsequently leased to the LMS. This helped standardisation as it concentrated all of the 8Fs on LMS lines. As they were withdrawn from LNER stock and taken into LMS stock in 1946 and 1947 the LMS renumbered them into the 8705–72 series to conform with the numbering system of their other 8Fs. The LNER and the LMS were both nationalised to form British Railways on 1 January 1948. By then, the size of Class O6 had been reduced to 1; LNER No. 3554 which was transferred to the London Midland Region in January 1948. Thus class O6 was rendered extinct by the transferral to another class, the LMS Stanier 8F class, and they subsequently retained their LMS numbers with the addition of 40000 standard to LMS types. Their subsequent history is therefore considered at LMS Stanier Class 8F.
Preservation
Subsequently, none of the former LNER Class O6 engines were preserved. However, engine 48518, one of 30 built in 1944–45 by Doncaster Works for the LMS, ended up in the Woodham Brothers scrapyard at Barry, and has survived as one of the 'Barry Ten'. This engine lost its tender during its time in the yard, and in 2008, lost its boiler to assist with the construction of new-built GWR 'County' class 4-6-0 1014 County of Glamorgan. Further parts are expected to be used to assist with the construction of new-build LMS 'Patriot' 4-6-0 45551 The Unknown Warrior, and it is believed that as a result of this, 48518 will not be restored in its own right. It has been suggested that 48518 could be restored in conjunction with fellow 'Barry Ten' locomotive, LMS 'Black Five' 44901. This was reported by Steam Railway magazine in 2012, but at present nothing has been said of this proposal and it is unlikely that these two locos will ever be restored.