The 40 class were a class of diesel locomotives built by Montreal Locomotive Works, Canada for the New South Wales Government Railways in 1951/52 with a total of 20 units and were the first mainline diesel electric locomotives to be built for the NSWGR. They were based on the ALCO RSC-3 design with some slight modifications. These included a cab sides that angled to reduce the width of the locomotive at the top of the cab roof, and placement of the handrails on the car body rather than the standard walkway handrail arrangement.
The 40 class were shipped from Canada in grey undercoat and were painted verdant green, similar to the NSWGR 38 Class Steam locomotive, at Eveleigh Carriage Works also where the 38 Class were painted. For the 1954 Royal Tour of Queen Elizabeth II 4001 and 4002 were repainted in a special royal blue livery. By the early 1960’s all were repainted Indian red.
The first 40 Class, 4001 enter service in November 1951 with the last entering in May 1952. They were originally used on heavy freight services from Sydney to Broadmeadow and later on North Coast services to Brisbane and Main South line services to Albury. When the 40 Class started to show their age during the late 1960’s, consideration was given to rebuilding the class including major electrical work was required but due to their lack of power compared to other diesels, the 40 class were withdrawn from May 1968 with the last being taken out of service in December 1971.
The New South Wales Rail Transport Museum preserved 4001 and it was returned to traffic in October 2010 painted in the blue livery. Also preserved were 4002 and 4006 with the remaining 17 scrapped.