By 1864, Shimla was declared as the summer capital of British India. After independence, the city briefly served as the capital of Punjab, before it finally became and remained the capital of Himachal Pradesh.