Kashmir is a geographical region in the north of the Indian Subcontinent. Throughout the course of the history the geographical extent of kingdom of Kashmir kept changing, however by the mid-19th century, the term Kashmir geographically denoted only the valley between the Great Himalayas and the Pir Panjal mountain range. Today, it denotes a larger area that includes the Indian administered territories of Jammu and Kashmir (which consists of Jammu, the Kashmir Valley, and Ladakh), the Pakistan administered territories of Azad Kashmir and Gilgit–Baltistan, and the Chinese-administered regions of Aksai Chin and the Trans-Karakoram Tract.
Although Jammu is part of the disputed Kashmir region, it is not geographically part of the Kashmir valley nor the Ladakh region. The Jammu Division is inhabited by the Dogra people who are historically, culturally, linguistically, and geographically connected with the Punjab region and the Pahari regions of the former Punjab Hills States that now comprise the state of Himachal Pradesh.
In the first half of the 1st millennium, the Kashmir region became an important centre of Kambojas 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 Swati dynasty. For the next five centuries, Muslim monarchs ruled Kashmir, including the Mughals, who ruled from 1586 until 1751, and the Afghan Durrani Empire, which ruled from 1751 until 1820.
That year, the Sikhs, 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 1947, when the former princely state of the British Indian Empire became a disputed territory, now administered by three countries: India, Pakistan, and the People’s Republic of China.