The Pennsylvania Railroad's steam locomotive class D5 (formerly Class G, pre-1895) comprised eighteen lightweight 4-4-0 locomotives for light duty, maintenance-of-way and branch-line service, constructed at the railroad's own Altoona Works (now owned by Norfolk Southern) during 1870–1873.[2]
They shared many parts with other standard classes, although less so with the heavy 4-4-0s on account of their lighter build; instead, they shared some components with 0-6-0switcher classes F and H (later and ).[3]
The Class G locomotives had a straight-topped boiler, unlike the wagon-top of the other 4-4-0 classes.