Within a decade, the Mughal Emperor Babur captured the fort from the Delhi Sultanate. The Mughals lost the fort to Sher Shah Suri in 1542. Afterwards, the fort was captured and used by Hemu, the Hindu general and, later, the last Hindu ruler of Delhi, as his base for his many campaigns, but Babur's grandson Akbar recaptured it in 1558. Akbar made the fort a prison for political prisoners. For example, Abul-Kasim, son of Kamran and Akbar's first cousin was held and executed at the fort. The last Tomar king of Gwalior, Maharaja Ramshah Tanwar, who had then taken refuge in Mewar, put up a strong resistance against Akbar and joined Maharana Pratap, his son-in-law, at the Battle of Haldighati. He was martyred in the battle along with his three sons (which included Shalivahan Singh Tomar, the heir-apparent)