The Pennsylvania Railroad's steam locomotive class D2 (formerly Class B, pre-1895) comprised twenty 4-4-0 locomotives intended for mountain passenger helper service, constructed at the railroad's own Altoona Works (now owned by Norfolk Southern) during 1869–1880.
[1] This design differed from the Class A (later D1) mainly in its smaller drivers for greater tractive effort in mountainous terrain.
Like all the early standardized 4-4-0s on the PRR, the Class B had a wagon-top boiler with steam dome and a firebox between the two driving axles.
In 1881, the PRR took the Class B design and modified it to produce more locomotives for express passenger service, with 68-inch (1,727 mm) drivers like the earlier Class A.
These new locomotives were designated Class B A, and were classified as D2a in the post-1895 scheme; forty-five of them were constructed.