Kashmir is the northernmost geographical region of the Indian subcontinent. It is bordered to the north and east by China (Xinjiang and Tibet), to the northwest by Afghanistan (Wakhan Corridor), to the west by Pakistan (Khyber Pakhtunkhwa and Punjab) and to the south by India (Himachal Pradesh and Punjab). The topography of Kashmir is mostly mountainous.

In the first half of the first millennium, the Kashmir region became an important centre of Hinduism and later of Buddhism; later still, in the ninth century, Kashmir Shaivism arose. In 1339, Shah Mir became the first Muslim ruler of Kashmir, inaugurating the Salatin-i-Kashmir or Shah Mir dynasty. The region was part of the Mughal Empire from 1586 to 1751, and thereafter, until 1820, of the Afghan Durrani Empire. That year, the Sikh Empire, under Ranjit Singh, annexed Kashmir.

In 1846, after the Sikh defeat in the First Anglo-Sikh War, and upon the purchase of the region from the British under the Treaty of Amritsar, the Raja of Jammu, Gulab Singh, became the new ruler of Kashmir. The rule of his descendants, under the paramountcy (or tutelage) of the British Crown, lasted until the Partition of India in 1947, when the former princely state of the British Indian Empire became a disputed territory, now administered by three countries: India, Pakistan, and China.

More Info: en.wikipedia.org