When the NZR needed new locomotives für suburban service, initial plans to rebuild the 2-6-2 class V into tank locomotives were skipped in favor of the new build of the class WF. These were 2-6-4T tank locomotives designed by the Railways Department's Chief Mechanical Engineer A. L. Beattie and NZR Chief Draftsman G.A. Pearson. With a maximum axle load of 9.3 tons, they were also light enough for branch line service.
Between 1904 and 1908, the NZR built 26 in their Addington and Hillside shops and got ten from A & G Price. Price also built two for the Public Works Department. As late as in 1928, the company built three more for the NZR. Initially they were also used on main lines, but soon only in suburban service and on branch lines.
Two each were used for tests with oil firing and one-person operation. Due to locomotive shortages in Tasmania, the TGR bought four each in 1939 and 1944 and designated them class DS. These were withdrawn between 1953 and 1956. The NZR withdrew the last ones only in 1968. Three were preserved, but none of them is operational although No. 403 is the only one with actual plans for restoration.