Shimla was founded as a hill station to be used as a strategic place for billeting troops, guarding frontiers and launching campaigns during the course of Anglo–Gurkha War. The Anglo–Gurkha War was fought between the Kingdom of Gorkha and the East India Company in 1814 due to border disputes and ambitious expansionism of the British Government. The war ended with the signing of the Treaty of Sugauli in 1816.