There are evidences of the existence of the pre-historic humans in this region. The first race to enter Himachal Pradesh was Proto-Australoid followed by Mongoloid and the Aryan. The Rig Veda mentions about Dasyus and Nishads living in this region and their powerful king Shambra who had 99 forts. From the early period of its history, tribes like the Koilis, Halis, Dagis, Dhaugris, Dasa, Khasas, Kinnars and Kirats inhabited it. The Aryans with their superior war tactics defeated the local tribes and settled here permanently. They lost their independence with the rise of the Guptas in the North Gangetic plains. After the decline of the Guptas, several small kingdoms ruled this hilly state and established their power in its different regions. Sankar Varma, the king of Kashmir exercised his influence over the regions of Himachal Pradesh in about 883 AD.
This region witnessed the invasion of Mahmud of Ghazni in 1009 AD. In about 1043 AD, the Rajputs ruled over this territory. The Mughal rulers erected several works of art as an admiration of this land. The Rajputs, under the leadership of Sansar Chand owned this region in 1773 AD, till the attack by Maharaja Ranjit Singh in 1804 AD, which crushed the Rajput power here. In about the early 19th century AD, the British exercised their influence and annexed the areas of Shimla after the Gurkha War of 1815-16. Shimla became the summer capital of India and even today, many old houses and buildings tell the story of English grandeur. Himachal Pradesh was made a centrally administered territory in 1948 with the integration of 31 hill states and obtained additional regions in 1966. It had the status of a union territory after independence till it was granted statehood in 1971.