The Ahmednagar Sultanate faced continuous pressure from the Mughal Empire. After the death of the able regent Malik Ambar in 1626, the state weakened. The Mughals, under Emperor Shah Jahan, launched a decisive campaign. In 1632, the Mughal general Mahabat Khan captured the fort of Daulatabad, which was the capital, and imprisoned the last Nizam Shahi ruler, the young Husain Shah III, sending him to Gwalior fort for life imprisonment. Although a nominal Nizam Shahi state was briefly revived under Shahaji Bhonsle, supported by Bijapur, the core territories were effectively annexed. The final formal annexation and division of the remaining territories were completed by a treaty in 1636.