After India and Pakistan got their independence, October 1947 observed extensive military exercise in New Delhi, Karachi (then capital of Pakistan). The same exercise was executed in Srinagar, the summer capital of the princely state of Jammu and Kashmir.
Both India and Pakistan were angling to accustom Jammu and Kashmir to their boundaries. However, Maharaja Hari Singh, the Hindu king of the Muslim-majority princely state, was not committing to either of the nations. Meantime, there were anti-Maharaja demonstrations, principally in Poonch and Srinagar.
Later, the Instrument of Accession, a legitimate document, was produced by Maharaja Hari Singh on October 26, 1947. By executing this document under the Indian Independence Act 1947, Maharaja Hari Singh accepted to consent to the Dominion of India.