The Dogra dynasty of Dogra Rajputs from the Shivalik hills created Jammu and Kashmir when all dynastic kingdoms in India were being absorbed by the East India Company. Events led the Sikh Empire to recognise Jammu as a vassal state in 1820, and later the British added Kashmir to Jammu with the Treaty of Amritsar in 1846. The founder of the dynasty, Gulab Singh, was an influential noble in the court of the Sikh emperor Maharaja Ranjit Singh, while his brother Dhian Singh served as the prime minister of the Sikh Empire. Appointed by Ranjit Singh as the hereditary Raja of the Jammu principality, Gulab Singh established his supremacy over all the hill states surrounding the Kashmir Valley. After the First Anglo-Sikh War in 1846, under the terms of the Treaty of Lahore, 1846, the British Indian government acquired Kashmir from the Sikh Empire and transferred it to Gulab Singh, recognising him as an independent maharaja. Thus, Jammu and Kashmir was established as one of the largest princely states in British India, receiving a 21-gun salute for its Maharaja in 1921. It was ruled by Gulab Singh and his descendants till 1947.
The last ruling Maharaja of Jammu and Kashmir was Hari Singh, who contributed troops to the British war effort in World War II and served on Churchill's Imperial War Cabinet. Following the Partition of India in 1947, Hari Singh faced a rebellion in the western districts of the state and a Pakistan - supported tribal invasion, leading him to accede to the Union of India and receive military assistance. Pakistan contested the accession, giving rise to the enduring Kashmir conflict.
With India's support, the popular leader of Jammu and Kashmir, Sheikh Mohammad Abdullah, forced the Maharaja to abdicate in favour of his son, Yuvraj (Crown Prince) Karan Singh, who subsequently accepted the position of a constitutional head of state (Sadr-i-Riyasat) and voluntarily gave up the title of Maharaja.
The term Dogra is thought to derive from Durgara, the name of a kingdom mentioned in an eleventh century copper-plate inscription in Chamba.