Junagadh was a princely state in Gujarat ruled by Muslim rulers in British India until it became part of India in 1948.

History
Mohammad Sher Khan Babi, a Babi Khel Pathan who owed allegiance to the Mughal governor of Gujarat subah, founded the state of Junagadh. It declared independence in 1730 after the Marathas Gaikwad invasion. Muhammad Sher Khan Babi, was the founder of the Babi Dynasty of Junagadh State dynasty. His descendants, the Babi Nawabs of Junagadh, took large territories in southern Saurashtra and ruled over the state for the next two centuries. First they were a tributary state of Marathas. Later they were under the rule of the British Raj.

In 1807 the Junagadh State became a British protectorate. The East India Company took control of the state by 1818. The Saurashtra area, with other princely states of Kathiawar, were separately administered under Kathiawar Agency by British India.

On 15 August 1947 upon the independence of India, the Nawab of Junagarh decided to merge it into newly formed Pakistan. The Indian government maintained the people of Junagadh should decide. Pakistan waited until 13 September to respond saying they accepted Junagarh's acceptance of Pakistani rule. This caused a general revolt among the Hindu majority of Junagadh as well as protest movements in the surrounding states that had acceded to join India. The Nawab then occupied territory in several of those states claiming he had rule over them. When the Indian government sent a small force to restore order, the Nawab fled to Pakistan. His Dewan (Prime minister) agreed to rule by India. This resulted in the integration of Junagadh into India.

Rulers
The Nawabs of Junagadh belonged to Pathan Babi khel tribe. They were granted a 13 gun salute by the British authorities:

 1730 - 1758 : Mohammad Bahadur Khanji or Mohammad Sher Khan Babi
 1758 - 1774 : Mohammad Mahabat Khanji I
 1774 - 1811 : Mohammad Hamid Khanji I
 1811 - 1840 : Mohammad Bahadur Khanji I
 1840 - 1851 : Mohammad Hamid Khanji II
 1851 - 1882 : Mohammad Mahabat Khanji II
 1882 - 1892 : Mohammad Bahadur Khanji II
 1892 - 1911 : Mohammad Rasul Khanji
 1911 - 1948 : Mohammad Mahabat Khanji III (last de facto ruler)

Dispute 
Many in Pakistan still maintains the 1948 plebiscite and rule by India was an illegitimate action. One of the reasons is because Kashmir at the time was ruled by a Hindu but had a clear Muslim majority. By acceding to India it was the opposite of the situation in Junagadh.

For its part India knew Junagadh was the premier state in the western Kathiawar region. It was bound on three sides by states that acceded to India. On the fourth side was bounded by the Arabian Sea. This gave it great strategic importance to both countries. India was not prepared to accept Junagadh's acceding to Pakistan. This would create a Pakistan state in the middle of Indian states. India's taking administrative control of Junagadh to restore order is seen as a pretext by Pakistan. The referendum taken by the people of Junagadh, under the control of the Indian army, was overwhelmingly in favor of Indian rule. Pakistan has never accepted this vote by the people there and believes Junagadh rightly belongs to them.

Pakistan's legitimacy claim 

Pakistan's government has maintained its territorial claim on Junagadh, along with Manavadar and Sir Creek in Gujarat, on its official political map issued on 4th August 2020.

References

Other websites 
Official Website of State of Junagadh
Classic Gallery of Indian Numismatics
Heraldry of the princely states of Gujarat

Territorial disputes
Gujarat
History of India
History of Pakistan
Indian princely states
 
Territorial disputes of Pakistan
1730 establishments
1948 disestablishments in India
1730s establishments in Asia
18th-century establishments in India