Muhammad Sher Khan Babai was the founder of the Babi dynasty of Junagarh in 1654. His descendants, the Babi Nawabs of Junagarh, conquered large territories in southern Saurashtra. However, during the collapse of the Mughal Empire, the Babis became involved in a struggle with the Gaekwad dynasty of the Maratha Empire over control of Gujarat during the reign of the local Mohammad Mahabat Khanji I. Mohammad Khan Bahadur Khanji I declared independence from the Mughal governor of Gujarat subah, and founded the state of Junagarh in 1730. This allowed the Babi to retain sovereignty of Junagarh and other princely states. During the reign of his heir Junagarh was a tributary to the Maratha Empire, until it came under British suzerainty in 1807 under Mohammad Hamid Khanji I, following the Second Anglo-Maratha War. In 1807, Junagarh became a British protectorate and the East India Company took control of the state. By 1818, the Saurashtra area, along with other princely states of Kathiawar, were separately administrated under the Kathiawar Agency by British India. In 1947, upon the independence and partition of India, the last Babi dynasty ruler of the state, Muhammad Mahabat Khanji III, decided to merge Junagarh into the newly formed Pakistan. However, the Hindu citizens, who formed the majority of the population, revolted, leading to several events and also a plebiscite, resulting in the integration of Junagarh into India.
Rulers
The Nawabs of Junagarh belonged to Pathan Babi or Babai. They were granted a 13gun salute by the British authorities:
1730–1758 : Mohammad Bahadur Khanji I or Mohammad Sher Khan Babai
rebellion in Junagarh raised by Mansa Khant during time of Nawab Sher Khan the first ruler of Junagarh. He was against Mughal Rule, Made Uparkot Fort his centre. He made a series of raids in surrounding villages and cities. Nawab was unsuccessful to control the rebellion. Mansa khant occupied the uparkot for thirteen months and make numerous raids mostly in countryside. Nawab started compaign against khant. Nawab was assisted by king of Gondal State thakur haloji Jadeja and arab jamadar sheikh abdullah zubeidi. The combined forces defeated the khant and captured uparkot and burnt down the rebellion.
Integration into India
In 1947, Shah Nawaz Bhutto joined the council of ministers of Nawab Muhammad Mahabat Khan III, and in May became his dewan or prime minister. With the independence of India in 1947, the princely states were left by the British to decide whether to accede to one of the newly independent states of India or Pakistan or to remain outside them. The Constitutional Advisor to the Nawab, Nabi Baksh, indicated to Lord Mountbatten that he was recommending that Junagarh should join India. However, upon the advice of Dewan Bhutto, on 15 August 1947, the Nawab announced that Junagarh had acceded to Pakistan. On 13 September, the Government of Pakistan accepted the accession. The majority of the people of Junagarh revolted, leading to the near-collapse of the state government, and India had to send its military into Junagarh. A plebiscite was conducted that had 91% of the population voting in support of joining India in December. The plebiscite overwhelmingly called for the integration of Junagarh into India. Nawab Muhammad Mahabat Khan III of Junagarh left to live in Sindh, Pakistan.