honor of a 13-gun salute. 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 II 1840–1851 – Mohammad Hamid Khanji II 1851–1882 – Mohammad Mahabat Khanji II 1882–1892 – Mohammad Bahadur Khanji III 1892–1911 – Mohammad Rasul Khanji 1911–1948 – Mohammad Mahabat Khanji III British period In 1807, Junagadh State became a British protectorate. The East India Company took control of the state by 1818, but the Saurashtra area was never directly administered by the British, who instead divided the territory into more than one hundred princely states, which remained in existence until 1947. The present old-town, developed during the 19th and 20th centuries, constituted one of those princely states. The Shri Swaminarayan Mandir temple in Junagadh was constructed on land presented by Jinabhai (Hemantsingh) Darbar of Panchala, and dedicated on 1 May 1828. Swaminarayan appointed Gunatitanand Swami as the first mahant (religious and administrative head of a temple), who served in this role and preached there for over 40 years. Annexation by India During the period just before the independence and partition of India and Pakistan in 1947, the 562 princely states that had existed outside British India, but under British suzerainty, were given the choice of acceding to either India or Pakistan, or to remaining apart. Although the states were theoretically free to choose, Earl Mountbatten stated that "geographic compulsions" meant that most of them would choose India. Mountbatten took the position that only states that shared a common border with Pakistan should choose to accede to it, but he had no power to impose this point of view on the states. On 15 September 1947, Nawab Mohammad Mahabat Khanji III of Junagadh – which, although located at the south-western end of Gujarat, had no common border with Pakistan – chose to accede to Pakistan, ignoring Mountbatten's views and arguing that Junagadh could access Pakistan by sea. The rulers of two states that were subject to the suzerainty of Junagadh — Mangrol and Babariawad — reacted by declaring their independence from Junagadh and acceding to India. In response, the nawab's forces militarily occupied the two states. Rulers of other neighbouring states reacted angrily, sent troops to the Junagadh frontier, and appealed to the government of India for assistance. A group of Junagadhis, led by Samaldas Gandhi, formed a government-in-exile, the