The class YG was a metre-gauge 2-8-2 goods locomotive that was part of the Indian Railway Standard (IRS) program. It was like a downscaled broad-gauge WG, but also shared many parts and its general appearance with the metre-gauge YP Pacific. Being the successor to the YD Mikado, it could deliver the same power despite a smaller boiler due to the use of the latest advancements in technology.
Between 1949 and 1972, a total of 1,074 were built by manufacturers from Austria, Canada, India, Czechoslovakia, Japan and the USA. The last YG built was at the same time the last metre-gauge steam locomotive built in India. Its wheel diameter of 48 inches (1,219 mm) also allowed it to be used for passenger trains.
In 1976, five locomotives which were only five years old were exported to Tanzania. They had been overhauled and modified for use in another country and became EAR class 27II. Many YG were still in use in India in the nineties, with the last ones being withdrawn in 1999. Today at least 50 are being preserved, some have also been sold to the USA.