1853. Operated by the Bengal Sappers, the railway line was built to carry soil used for the construction of the Upper Ganges Canal aqueduct from Piran Kaliyar, 10 km (6.2 miles) from the city. The locomotive rail paths are still intact. A replica of what the locomotive is thought to have looked like is exhibited at Roorkee Railway Station.
The municipality of Roorkee was created in 1868. It had been home to the Bengal Sappers and Miners since 1853, and two artillery units were stationed there. Today, the Roorkee Cantonment has a large army base. The Bengal Engineering Group and Centre (BEG&C), are still there today.
In 1901, when the city had a population of 17,197, it was made headquarters of the Roorkee Tehsil, in Saharanpur district of the United Province of the British Raj; the tehsil included in it 426 villages (of the parganas of Jwalapur, Manglaur and Bhagwanpur) and six towns, most important among them being Haridwar and Manglaur. The Old Cemetery in the city is a protected monument, by the Archaeological Survey of India.
Roorkee is also famous for the shrine of 13th century Sufi saint Alauddin Sabir Kaliyari — the dargah is also known as Sarkar Sabir Pak — in Piran Kaliyar village, where an annual 15-day spiritual fair (Urs) is held