 India gained its independence from the United Kingdom on midnight of 15 August 1947, and simultaneously Pakistan was created as a new country as a result of the partition of India.Jammu and Kashmir, then a princely state under suzerainty of British Monarch, and ruled by Maharaja Hari Singh who tried to avoid declaring his state's accession to either of the two dominions at the time of independence (although that was not an option under the Indian Independence Act, 1947).Maharaja Hari Singh signed a standstill agreement with Pakistan.