After coming into the control of many dynasties including those of Gupats and Harshavardhana, the territory of Himachal Pradesh was divided into small principalities headed by chieftains. Some of these small kingdoms were ruled by Rajput chieftains.
These principalities were invaded by the Muslim armies at regular intervals. At the beginning of the 10th century, Mahmud Ghaznavi launched a military campaign against Kangra and captured it.
Timur and Sikander Lodi also made similar raids. Many of the hill kingdoms became vassals of the Mughal empire. During India’s struggle for freedom, most of the princely states of Himachal Pradesh either remained indifferent or supported the cause of the British. After becoming a Union Territory on 1 November 1956, Himachal Pradesh became the eighteenth state of the Indian Union on 18 December 1970 thanks to the enactment of the State of Himachal Pradesh Act by the Indian Parliament