Shimla was a scatter of hill villages under the Raja of Keonthal when the Company took the ridge after the Gurkha war of 1814 to 1816. It became the summer capital of British India in 1864 and the summer seat of the Punjab government. For about half the year the administration of a fifth of the world's population ran from a hill station reached by a narrow-gauge railway.
The Simla Deputation of October 1906, in which a group of Muslim notables asked the Viceroy for separate electorates, met here. The Simla Conference of June and July 1945, which failed over the composition of the executive council, met here. So did the talks of May 1947 in which the partition plan took its final shape.
Shimla was the capital of Punjab after 1947 while Chandigarh was being built, and the Punjab government offices did not leave until the early 1960s.
In 1966 the hill districts of Punjab, Kangra, Kullu, Lahaul and Spiti, Shimla and part of Hoshiarpur, were transferred to Himachal Pradesh when the state was reorganised on language. Punjab lost roughly a third of its area in that division and its hill population with it.
The whole secretariat moved twice a year, the files and the clerks and the furniture with it, up in April and down in October, first by cart and bullock and later on the Kalka Simla line. The cost of the migration was a standing complaint in the Legislative Council and it was defended each time on the health of the officials.
The Punjab government did the same and the offices, the residences and the Mall were built for it, along with the railway that reached it in 1903.
It went to Himachal Pradesh in 1966. A great deal of the paper generated about the Punjab in the nineteenth century was written there and almost none of it is there now.