The North British Railway (NBR) G Class (LNER Class Y9) is a class of 0-4-0ST steam locomotive designed for shunting. Some locomotives were equipped with small wooden tenders to carry extra coal. They were introduced in 1882 and thirty-eight entered service on the NBR between 1882 and 1899. Like most 0-4-0 tanks of the period it has outside cylinders and inside slide valves driven by Stephenson valve gear. The rival Caledonian Railway had the same number (38) of identical locomotives in service. The nickname "Pug" was used on the NBR. (The Caledonian Railway, in common with several other companies, used this nickname for all small shunting engines.)