Kashmir (Kashmiri: کٔشِیر / कॅशीर; Urdu: کشمیری; Uyghur: كەشمىر; Shina: کشمیر) is the northwestern region of the Indian subcontinent. Until the mid-19th century, the term Kashmir geographically denoted only the valley between the Great Himalayas and the Pir Panjal mountain range. Today Kashmir denotes a larger area that includes the Indian-administered state of Jammu and Kashmir (which consists of the divisions: the Kashmir valley, Jammu and Ladakh), the Pakistani-administered Gilgit–Baltistan and the Azad Kashmir provinces, and the Chinese-administered regions of Aksai Chin and Trans-Karakoram Tract.
In the first half of the first millennium, the Kashmir region became an important center of Hinduism and later of Buddhism; later still, in the ninth century, Kashmir Shaivism arose. In 1349, Shah Mir became the first Muslim ruler of Kashmir and inaugurated the Salatin-i-Kashmir or Swati dynasty. For the next five centuries, Muslim monarchs ruled Kashmir, including the Mughals, who ruled from 1526 until 1751, then the Afghan Durrani Empire that ruled from 1747 until 1820. That year, the Sikhs, under Ranjit Singh, annexed Kashmir. In 1846, upon the purchase of the region from the British under the Treaty of Amritsar, the Dogras—under Gulab Singh—became the new rulers. Dogra Rule, under the paramountcy (or tutelage) of the British Crown, lasted until 1947, when the former princely state became a disputed territory, now administered by three countries: India, Pakistan, and the People's Republic of China.