The Nilgiri Mountain Railway or "NMR" is the only rack railway in India. Based in Tamil Nadu, India, it was built by British in 1908. It is currently operated by Southern Railway.
Before going forward, let us understand the rack railway system. The Rack Railway has a toothed rack rail between the running rails. The trains are fitted with one or more cog wheels or pinions that mesh with this rack rail. This allows the trains to operate on steep grades. See the animation below to have a clear understanding:
The NMR still uses steam locomotives, but have recently started using diesel locomotives instead of steam ones. In July 2005, UNESCO added the Nilgiri Mountain Railway as an extension to the World Heritage Site of Darjeeling Himalayan Railway. The site then became known as Mountain railways of India.
'Nilgiri Passenger' train runs on these tracks and covers a distance of 26 km (16.2 mi). It travels through 208 curves, 16 tunnels, and across 250 bridges. The uphill journey takes around 290 minutes (4.8 hours), and the downhill journey takes 215 minutes (3.6 hours). It has the steepest track in Asia with a maximum gradient of 8.33%.