In 1857, soon after the sepoys rose against the East India Company in a burst of volcanic fury, the Delhi Gazette carried a proclamation issued in the name of the Mughal emperor, Bahadur Shah Zafar. Popularly called the Azamgarh Proclamation, this was authored most likely by a junior member of the imperial household, though its contents are not remotely less fascinating on this account. Besides predictable denouncements of the “tyranny and oppression of the treacherous" English, the document was also a manifesto that sought to win support from influential quarters, offering—like political manifestos today—a cascade of promises. Thus, for instance, the rights of zamindars were guaranteed, just as attractive pay was guaranteed to soldiers. More interestingly, among promises made to the commercial classes was one that speaks much of the age in which the mutiny took place. For it was pledged to men of trade that when the badshahi regime was restored, they would enjoy “gratis" the use of “government steam-vessels and steam carriages for the conveyance" of their all-important merchandise.

As it happened, the rebels scattered and the Mughal emperor fell. But on his journey to Burma (now Myanmar) in a bullock cart, Bahadur Shah Zafar did witness the construction of railway lines on which would ply the “steam carriages" that only yesterday were offered free in his name. While rebel leaders discerned advantages in this new mode of transport for purposes of trade, they were hardly alone: 10 years earlier, The Times in London had claimed that while “there may be no diamonds (left) at Golconda", there was “the worth of a ship-load of diamonds in the cotton fields of the Deccan." All that was needed to exploit this plentiful land was a reliable network. Then, of course, the mutiny confirmed for the British the military advantage that the railways offered, as loyal armies could in future make their way at record speed and contain any threat of rebellion. This, perhaps, was among the reasons that agitated Gandhi when he beheld the welding of India’s geography with steel and steam, declaring ominously that this was all for “bad men (to) fulfil their evil designs with greater rapidity".

Leaving the Mahatma’s suspicions aside, the railways in India roused many, from Rudyard Kipling to Rabindranath Tagore, Florence Nightingale to R.K. Narayan. Talk of its introduction in the subcontinent began in the 1830s and, ironically, endless concerns were raised. One question was of viability: would “the Hindoos", with their caste and religious taboos, embrace the railways, or would they boycott it resolutely? In the event, “the Hindoos" nodded approval: pilgrimages that took weeks could now be covered in days, even if by means of the devil’s contraption. Others argued that the fire carriage was at best a vanity project—India’s destiny lay in waterways, insisted Sir Arthur Cotton, whose thousands of statues stand testament to his efforts in this direction in the Godavari belt. Meanwhile another set of people welcomed the steam engine for its political potential. “If India is to become a homogenous nation," wrote Sir T. Madhava Rao, the 19th century statesman, “it must be by means of the Railways [and]…the English language." (Good for him that he lived then, for today he would be labelled anti-national.)

The dawn of our railways (now fourth largest in the world, transporting billions and with over a million employees), like new technology in general, inspired opportunity while also birthing subversion. As scholar Arup K. Chatterjee writes, the railways could become “clandestine spaces for experimentation" where “vegetarian looking businessmen" tasted chicken and mutton: removed physically from their everyday universes, days and hours spent on the track offered a window into something new, something that was usually taboo. To Europeans in India, meanwhile, the way the railways functioned offered a “nominal provincial Europe" on wheels, where the food, cutlery, décor, and everything else reminded them of home. And then, all the same, there could also be disease and horror—to quote Ira Klein, “plague (too) rode the rails". In 1947, similarly, the railways conveyed death across the border, as photographs recorded their role in the tragedy of Partition.

The British, of course, presented the railways as proof of their civilizing mission—this when it was an elaborate commercial enterprise delivering obscene profits to English investors at the expense of the Indian peasant. Then the railways also allowed for architectural experiments: buildings like the erstwhile Victoria Terminus in Mumbai projected colonial splendour, visually stamping India with the presence (and threat) of British imperium. To the dismay of the architects of empire, however, the railways also ended up transporting that inconvenient thing called nationalism. Soon, even the Mahatma was able to Indianize the railways, using it, as Chatterjee notes, to collect donations just as much as to launch forth on swaraj, every station and every third-class carriage a platform for his invigorating politics. Revolutionaries, meanwhile, could disrupt rail lines, and even such small things as travelling ticket-free or pulling the chain became acts of civil disobedience. What began as a (lucrative) civilizing mission, then, ended up embodying Indian resistance.

In the end, the story of the railways in India is one of splendour as well as shock, elegance as well as embarrassment, opening up many worlds in which its carriages and engines have served as both witnesses and participants. In its early avatar, it was a symbol of colonial oppression. But like with foreign ideas that were seized by Indians for their own domestic purposes and intentions, the railways quickly won our imagination, becoming integral to the shaping of our national character. The Father of the Nation might well have continued to suspect the railways even as he used it, but there is no doubt that its steel frame occupies a place of importance in our tale as a people: one that bridged far and diverse provinces, even as it connected everyone from Bahadur Shah Zafar to the Mahatma himself.

Medium Rare is a column on society, politics and history. Manu S. Pillai is the author of The Ivory Throne (2015) and Rebel Sultans (2018).

He tweets at @UnamPillai