The NBR Class M (later LNER Class D27 & D28) was an older but very similar type of 4-4-0 locomotive, commonly known as the Abbotsford class, and a pioneering 4-4-0 design by Dugald Drummond. A total of 12 were produced. The engines were rebuilt (6 in 1902 and 6 in 1904) to become almost exact copied of the D31 engines. The only visible differences between the 1902 (D27) and 1904 (D28) designs were slight differences to the cab doors and windows.
Although both the Holmes and the Drummond engines were included in the class M designation when the NBR adopted formal class designations in 1913, the LNER did not consider the locomotives to be of the same class, and in 1923 (on grouping) the Holmes M class became LNER class D31, whilst the two types of Abbotsfords became LNER classes D27 and D28.
The D27 & D28 type locomotives were withdrawn earlier. Five were scrapped pre-grouping, although the other seven passed to the London and North Eastern Railway in 1923. All were withdrawn by 1926, with none passing to British Railways at nationalisation.
The common nickname "Abbotsfords" for the D27 and D28 locomotives is derived from the name of engine 479 (the fourth built). This engine was used in publicity photographs at the Cowlairs works when the locomotives were built, and these publicity photographs are believed to be the origins of the nickname.
The 574 series engines were constructed in 1884, with a total of 6 built. The 633 series engines numbered 24 locomotives in total, built from 1890 to 1895. The initial batch of 729 series engines was constructed in 1898, with 12 built; this was followed by a second batch of 6 engines the following year. All three types were reconstructed under Locomotive Supintendant William Reid, to form the Class M, with a total of 48 engines.
The NBRs earlier Abbotsford 4-4-0 locomotives (built 1877-1879) had been the railway's initial experiment with powerful express 4-4-0 engines, designed by Dugald Drummond. When these 12 engines were rebuilt, 6 in 1902 and 6 in 1904, they were left almost identical to the class M engines, and the NBR included them in the "Class M" designation, giving a total of 60 engines in the class. However, upon grouping in 1923 the LNER designated the 48 "true" Class M engines as class D31, but gave the rebuilt Abbotsford engines different designations - class D27 for the 1902 batch, and class D28 for the 1904 batch.