Following independence in 1947, India inherited a decrepit rail network. A large chunk of the railways now passed through the newly formed Pakistan. A large number of lines had to be rerouted through Indian territory, and new construction had to be undertaken. A total of forty-two separate railway systems, including thirty-two lines owned by the former Indian princely states existed at the time of independence spanning a total of 55,000 km. These were amalgamated into the Indian Railways.
In 1951, the rail networks were abandoned in favour of zones. A total of six zones came into being in 1952. As India developed it economy, almost all railway production units started to be built indigenously. Broad Gauge became the standard, and the Railways began to electrify most lines to AC.
In 1985, steam locomotives were phased out. Under Rajiv Gandhi, reforms in the railways were carried out. In 1987, computerisation of reservation first was carried out in Bombay and in 1989 the train numbers were standardised to four digits. In 1995 the entire railway reservation was computerised through the railways intranet. In 1998, the Konkan Railway was opened, spanning difficult terrain through the Western Ghats. A Calcutta Metro has been built.