The Nilgiri Mountain Railway is a 46 Km long and runs on 1000 mm gauge railway. It connects Mettupalayam to Ooty. The first section of the Nilgiri Railway up to Coonoor was completed in 1899 by the Nilgiri Railway Company and was extended to Ooty in 1903.
This Nilgiri rail system is unique as it is the steepest one in Asia. In combination with this gradient there are many curves. To overcome this incline the Nilgiri Railway uses a unique `rack and pinion' rail system. In this system, between the two conventional rails, there are two rack bars, out of step with each other, on which the pinions of the locos and coaches 'climb' in a similar manner as a person climbing a ladder using his feet alternately.
It is interesting to note that the engine pushes the train from behind when ascending the hills and is in front, while going downhill so that the train does not run amuck. The main incline between Mettupalayam to Coonoor is a continuous gradient where the rack system is used. After Coonoor until Ooty the gradient is relatively eased.
Presently all traffic on the rack section is ably handled by the eight X class locomotives built by SLM of Switzerland. These locomotives have four cylinders instead of the conventional two. The main cylinders of the locomotive use high-pressure steam and drive the wheels of the loco while the smaller cylinders using low-pressure steam drive the rack system of the Nilgiri Railway system. Another interesting thing associated with the Nilgiri Railway is that the youngest X class loco is over 50 years old and the oldest is 80 years old!