Eighteen of the 21 locomotives passed into British Railways ownership in 1948 (eleven former class V, and seven former class F).
The last locomotive of the D40 class was 62277 Gordon Highlander and it was withdrawn in 1958 from Kittybrewster Depot, Aberdeen.