Hyderabad is the capital and largest city of the Indian state of Telangana and de jure capital of Andhra Pradesh. Occupying 625 square kilometres along the banks of the Musi River, located on the Deccan Plateau in the northern part of South India. At an average altitude of 542 metres, much of Hyderabad is situated on hilly terrain around artificial lakes, including Hussain Sagar lake—predating the city's founding—north of the city centre. Hyderabad City has a population of about 6.9 million, with about 9.7 million in Hyderabad Metropolitan Region, making it the fourth-most populous city and sixth-most populous urban agglomeration in India. With an output of US$74 billion, Hyderabad is the fifth-largest contributor to India's overall gross domestic product.
In 1591 Qutb Shahi ruler Muhammad Quli Qutb Shah established Hyderabad to extend the capital beyond the fortified Golconda. In 1687 the city was annexed by the Mughals. In 1724 Mughal governor Nizam Asaf Jah I declared his sovereignty and founded the Asaf Jahi dynasty, also known as the Nizams. Hyderabad served as the imperial capital of the Asaf Jahi from 1769 to 1948.