At the time of the Partition of India, the princely states of India, who in principle had self-government within their own territories, were subject to subsidiary alliances with the British, giving them control of their external relations. In the Indian Independence Act 1947 the British abandoned all such alliances, leaving the states with the option of opting for full independence. However, by 1948 almost all had acceded to either India or Pakistan. One major exception was that of Hyderabad, where the Nizam, a Muslim ruler who presided over a largely Hindu population, chose independence and hoped to maintain this with an irregular army recruited from the Muslim aristocracy, known as the "Razakars". The Nizam was also beset by the Telangana uprising, which he was unable to subjugate.