Under the Bahmani Sultanate, Golconda slowly rose to prominence. Sultan Quli Qutb-ul-Mulk (r. 1487–1543), sent by the Bahmanids as a governor at Golconda, established the city as the seat of his government around 1501. Bahmani rule gradually weakened during this period, and Sultan Quli formally became independent in 1538, establishing the Qutb Shahi dynasty based in Golconda. Over a period of 62 years, the mud fort was expanded by the first three Qutb Shahi sultans into the present structure, a massive fortification of granite extending around in circumference. It remained the capital of the Qutb Shahi dynasty until 1590 when the capital was shifted to Hyderabad. The Qutb Shahis expanded the fort, whose outer wall enclosed the city.