<Tr> <Td_colspan="2"> Today part of </Td> <Td> India, Pakistan and China </Td> </Tr> <P> Jammu and Kashmir was, from 1846 until 1952, a princely state of the British Empire in India and ruled by a Jamwal Rajput Dogra Dynasty . The state was created in 1846 from the territories previously under Sikh Empire after the First Anglo - Sikh War . The East India Company annexed the Kashmir Valley, Jammu, Ladakh, and Gilgit - Baltistan from the Sikhs, and then transferred it to Raja Gulab Singh of Jammu in return for an indemnity payment of 7,500,000 Nanakshahee Rupees . </P> <P> At the time of the British withdrawal from India, Maharaja Hari Singh, the ruler of the state, preferred to become independent and remain neutral between the successor dominions of India and Pakistan . However, an uprising in the western districts of the State followed by an attack by raiders from the neighbouring Northwest Frontier Province, supported by Pakistan, put an end to his plans for independence . On 26 October 1947, the Maharaja signed the Instrument of Accession joining the Dominion of India in return for military aid . The western and northern districts presently known as Azad Kashmir and Gilgit - Baltistan passed to the control of Pakistan, while the remaining territory became the Indian state Jammu and Kashmir . </P> <P> The Dogra state in Jammu was established by Dhruv Dev, of the Jamuwal (Jamwal) family, during the declining years of the Mughal Empire in the 18th century . The Jammu state then asserted its supremacy among the' Dugar' states to the south of the Kashmir Valley . Its ascent reached its peak under Dhruv Dev's successor Raja Ranjit Dev (r . 1728--1780), who was widely respected among the hill states. . Towards the end of Ranjit Dev's rule, the Sikh Misls (misls) gained ascendency, and Jammu began to be contested by the Bhangi, Kanhaiya and Sukerchakia misls . Around 1770, the Bhangi misl attacked Jammu and forced Ranjit Dev to become a tributary . Brij Lal Dev, his successor, was defeated by the Sukerchakia Misl under Mahan Singh, who sacked Jammu and plundered it . Thus Jammu lost its supremacy over the surrounding country . </P>

Why did the ruler of kashmir join india
find me the text answering this question