Ahmedabad, also known as Amdavad, is the largest city and former capital of the Indian state of Gujarat. The city is an administrative centre of Ahmedabad district, and is the judicial capital of Gujarat as the Gujarat High Court is in Ahmedabad. Ahmedabad was founded on 26 February 1411 by Sultan Ahmed Shah to serve as the capital of the Gujarat Sultanate, and was named after him. With a city population of more than 5.5 million and an extended population of 6.3 million it is the fifth largest city and seventh largest metropolitan area of India. Ahmedabad is located on the banks of the River Sabarmati, 32 km (20 mi) from the state capital Gandhinagar.