Prior to 1947, Jammu and Kashmir (Kashmir) was a princely state under British Paramountcy, ruled by a Hindu maharaja. With the impending independence of India and Pakistan, the British announced that the British Paramountcy would lapse and the rulers of princely states were given the option of joining one of the two new countries (termed "accession") or staying independent. The Maharaja of Jammu and Kashmir chose to stay independent, given the mixed ethnic and religious composition of the state's population.[lower-alpha 1]