During a severe power shortage in the years before the turn of the century, the NZR ordered locomotives from abroad which could not be produced locally. For passenger service, six 4-6-0 class UA locomotives were ordered from Sharp, Stewart & Co. in Britain and ten 4-6-0 class UB from Baldwin in the USA. At the same time, sharp built the 4-8-0 class B. The UA used the same boiler as the U, but with a higher pressure of 175 instead of 160 psi, piston valves and smaller drivers for a higher tractive effort.
These locomotives were numbered 172 to 177 and mostly used in the south of the South Island. Originally, they had low mounted running boards and splashers over the drivers. These running boards were later raised and the splashers removed. At the same time, the smokebox was lengthened. In the twenties, two or three locomotives received a new superheated boiler pressed to 200 psi. They were withdrawn between 1933 and 1936.