The name Kashmir is derived from the terms 'Ka' meaning water and Shimeera meaning 'desiccate'. The History of Jammu and Kashmir dates back to the Hindu mythology which says that Kashmir was initially a lake that was drained by the Sage Kashyap. The state of Kashmir was one of major centers of the scholars of Sanskrit. Ashoka, the Mauryan emperor is credited to be the founder of Srinagar. Islam became dominant in Kashmir in the 13th century. The Sufi-Islamic way of life of the Muslims was very much similar to the tradition of the pundits of Kashmir.
According to the history of Jammu and Kashmir, after four centuries of the Muslim rule under the Afghans and Mughals, the control of the Kashmir valley was passed to the conquering Sikh armies. Also the state of Jammu that was under the Hindu Raja Ranjit Deo was captured by the Sikhs, who belonged to Lahore. Gulab Singh, the grand nephew of Ranjit Deo was made the Raja of Jammu in 1820. He soon conquered Ladakh and Baltistan.
In the history of Jammu and Kashmir the state of Jammu and Kashmir was formed as a single entity in the year 1846 following the treaty of Amritsar between Gulab Singh and the British government. A new state that comprised of Jammu, Ladakh and Kashmir was formed under the founder ruler Maharaja Gulab Singh.
The feudal dispensation of the rule being too harsh, the Kashmiris led by Sheikh Mohammad Abdullah rose against the autocratic rule. This was during the same time when India was being led by Mahatma Gandhi and Jawaharlal Nehru against the British. History of Jammu and Kashmir speaks that Ranbir Singh, the Raja of Jammu and Kashmir at the time of Independence, was given the freedom to opt either for Pakistan or India.
In October 1947 the Pasthuns from Pakistan invaded the Kashmir valley and the Raja sought assistance from Lord Mount Batten who then asked him to make the state a part of India which was done under the Instrument of Accession. This is the history of Jammu and Kashmir till the year 1947.