According to a legend, the great sage Kashyap drained a lake and the Brahmins then inhabited it. The place came to be known as Kashmir. A land of turbulent past and present, the missionaries of Emperor Ashoka introduced the Buddhism in the region. The religion flourished under the rule of Kushan in 2nd Century. However, Hinduism continued to be the dominant religion of the region for many centuries. In the 7th Century, Durlabhavarrdhana founded the Karkota dynasty, which was replaced by Utpalas in 855 AD, which were succeeded by the Tantrins, Yaskaras, Guptas abd Loharas ruled respectively. The first Muslim who reigned Kashmir was Shams-ud-Din who replaced the last Hindu king, Udiana Deva in 1346. Moghul emperor Akbar conquered it in 1586 and thus Kashmir became a part of his vast empire.
1757 saw the victory of Ahmed Shah Durrani and Kashmir went out to
Pakistan until 1819, when Ranjit Singh won it again to annex it to his
Sikh empire. In 1846, the British defeated the Sikhs and sold it to
Ghulab Singh of Jammu for Rs 7.5 million under the Treaty of Amritsar
and gave him the status of an independent princely ruler of Kashmir. He
conquered Ladakh and added it to his dominion. Maharaja Ghulab Singh
died in 1857 and was succeeded by Maharaja Rambir Singh. Maharaja Partab
Singh and Maharaja Hari Singh ruled over Kashmir in succession.
The India-Pakistan partition took place during the reign of Hari Singh
in 1947 and the rulers of princely states were given the choice to
freely accede to either India or Pakistan or to remain independent.
However, since the Maharaja of Kashmir was a Hindu, he chose to join
India despite the majority of the Muslim population in his dominion.
However, since then there have been controversies over the decision and
Pakistan claims that the decision was partial and the region should be a
part of its dominion.
Find all about the history and origin of the state of Jammu and Kashmir