The South Australian Railways H Class locomotives were built by Robert Stephenson and Company in 1870 for the South Australian Railways. The first of three numbered 25, 26 and 27 were all in service by June 1871. After being a well received class, two more locomotives (Nos. 28 and 29) were ordered and were in service by October 1872. Nos. 30 and 31 arrived in August 1874. The final two locomotives ordered for the SAR arrived in August 1877 and were numbered 2 and 3. These locomotives worked on the SAR system for many years, with only one member of the class being withdrawn in 1888. The rest of the class were rebuilt over the years and lasted well into the next century with, the final locomotive being withdrawn by 1930.
The first three of the newly designated H class were newly imported from England to work goods trains on the lightly laid line north of Roseworthy to Burra-Burra. After the H classes arrival on this north part of the line it relieved the smaller G class tank locomotives for duties elsewhere on the South Australian Railways. Proving to be a very successful class of locomotives, a further set of purchases were made from the Robert Stephenson and Company in the years leading up to 1877. A total of nine H Cass engines were in service by 1877 working on the Burra-Burra line hauling food and supplies from Adelaide and returning with more products for the Burra-Burra mines.
When the heavier R class 4-6-0 locomotives arrived in 1886, work was found for the H class on other parts of the SAR system. This included hauling trains between Strathalbyn, Milang and Victor Harbor. Locomotive No. 25 was hired out by contractors for a short period of time to assist in constructing the Aldgate to Nairne line. Locomotive No. 2 was also hired out to assist with construction work on some of the Murraylands lines which also serviced the Mallee wheatlands. These lighter lines (including the Pinnaroo line) were eventually 'home' to the H class in their later years of service on the SAR. Their useful lives on the network came to an end by working suburban shunting duties and occasional passenger runs to the northern suburban stations. The arrival of larger motive power for the SAR and even heavier trains being run ultimately resulted in the last H class engine being scrapped in 1930.