The London and North Eastern Railway (LNER) Class O6 was a class of 2-8-0 steam locomotives of the Stanier Class 8F type.
The LMS Stanier Class 8F 2-8-0 had been chosen by the War Department to be its standard heavy freight locomotive (see Stanier Class 8F). 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 (LMS Nos 8500-59). These were loaned by the REC to the LNER. The LNER subsequently chose to build some of the design for themselves.
Construction was divided between Darlington Works and Doncaster Works. 25 were also subcontracted to the Southern Railway's Brighton Works, which had also built 8Fs for the Railway Executive Committee.
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 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 Class 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.