The NZR BB class of steam locomotives comprised 30 engines operated by the New Zealand Railways (NZR) in the North Island of New Zealand. Ordered to replace smaller locomotives of several classes in the North Island, they were similar in design and appearance to the preceding B and BA classes. The first BB class locomotive entered service in February 1915, with the last to commence operations doing so on 8 March 1917. All were built by A & G Price Ltd of Thames, New Zealand, and as their cylinders had a larger diameter than the B and BA locomotives they were capable of generating more power to haul heavier trains. The most visible difference however was the roundtop firebox in place of the preceding classes Belpaire design. The BB class could haul up to 700 long tons (710 t; 780 short tons) of freight on a level railway line, though they were limited to a top speed of around 40 mph (64 km/h).
The BB class did not solely haul freight trains. They were also utilised to haul passenger trains, generally, on branch lines where light track meant trains could not be operated at speeds unattainable for the BB class. These trains included services for miners working in coal mines along branches in the Waikato region (e.g. Glen Massey Branch). However, they arrived at the same time as the AB class Pacific, and as these proved equally adept at hauling freight trains of similar tonnage they were proliferated while no further BB types were ordered.
In the latter days of steam, powerful locomotives such as the K class were hauling heavy trains that the C class and other shunting locomotives at yards and depots simply could not handle. Accordingly, ten members of the BB class were modified to perform shunting duties between 1932 and 1938, and they successfully took on the heaviest of roles.
Most BB locomotives survived into the 1960s. In later years they were concentrated at the yards in Auckland, Frankton and Palmerston North. In the mid-1960s four were sent to Dunedin and Invercargill. During that decade, the complete withdrawal of the class was undertaken progressively, with the last two, BB 626 and BB 633, formally removed from service in August 1968. Another one of the last to be withdrawn was BB 144 in October 1967. It was purchased by Les Hostick. Today it is leased to Ian Welch and is under restoration at the Mainline Steam Heritage Trust's Parnell depot. No other BB locomotive has been preserved.