When the British relinquished their claims to paramountcy, the 562 independent princely states were given the option to join either of the two nations. A few princely states readily joined Pakistan, but the rest--except Hyderabad (the largest of the princely states with 132,000 square kilometers and a population of more than 14 million), Jammu and Kashmir (with 3 million inhabitants), and Junagadh (with a population of 545,000)--merged with India. India successfully annexed Hyderabad and Junagadh after "police actions" and promises of privileges to the rulers.
The nawab of Junagadh and the nizam of Hyderabad were both Muslims, though most of their subjects were Hindus, and both states were surrounded by India. Junagadh, however, faced Pakistan on the Arabian Sea, and when its nawab followed Jinnah's lead in opting to join that Muslim nation, India's army moved in and took control of the territory.