of the Deccan—(administrator of six Mughal governorates) with the title Nizam-ul-Mulk (Administrator of the Realm). In 1721, he was appointed as Prime Minister of the Mughal Empire. His differences with the court nobles led him to resign from all the imperial responsibilities in 1723 and leave for Deccan. Under the influence of Asaf Jah I's opponents, Mughal Emperor Muhammad Shah issued a decree to Mubariz Khan, to stop Asaf Jah I which resulted in the Battle of Shakar Kheda. In 1724, Asaf Jah I defeated Mubariz Khan to establish autonomy over the Deccan, named the region Hyderabad Deccan, and started what came to be known as the Asaf Jahi dynasty. Subsequent rulers retained the title Nizam ul-Mulk and were referred to as Asaf Jahi Nizams, or Nizams of Hyderabad. The death of Asaf Jah I in 1748 resulted in a period of political unrest as his sons and grandson—Nasir Jung (1748–1750), Muzaffar Jang (1750-1751) and Salabat Jung (1751-1762)—contended for the throne backed by opportunistic neighbouring states and colonial foreign forces. The accession of Asaf Jah II, who reigned from 1762 to 1803, ended the instability. In 1768 he signed the Treaty of Masulipatam—by which the East India Company in return for a fixed annual rent, got the right to control and collect the taxes at Coromandel Coast. In 1769 Hyderabad city became the formal capital of the Asaf Jahi Nizams. In response to regular threats from Hyder Ali (Dalwai of Mysore), Baji Rao I (Peshwa of the Maratha Empire), and Basalath Jung (Asaf Jah II's elder brother, who was supported by French General the Marquis de Bussy-Castelnau), the Nizam signed a subsidiary alliance with the East India Company in 1798, allowing the British Indian Army to be stationed at Bolarum (modern Secunderabad) to protect the state's capital, for which the Nizams paid an annual maintenance to the British. Until 1874 there were no modern industries in Hyderabad. With the introduction of railways in the 1880s, four factories were built to the south and east of Hussain Sagar lake, and during the early 20th century, Hyderabad was transformed into a modern city with the establishment of transport services, underground drainage, running water, electricity, telecommunications, universities, industries, and Begumpet Airport. The Nizams ruled the princely state of Hyderabad during the British Raj. Post-Independence After India gained independence, the Nizam declared his intention to remain independent rather than become part of the Indian