Shaikh Muhammad, the name of the town was changed to Mubarakabad in 1347 (748 Hijri). In 1395, the Bahmanis conquered Miraj. Between 1391 and 1403, Miraj was affected by the Durgadevi famine. From 1423, Malik Imad Ul Mulk ruled Miraj. 1494 was the year of Bahadur Khan Gilani's rebellion. For two months of 1660, Shivaji and Adilshah battled for control of Miraj. Fortress The builder of the Miraj fort is unknown. It probably predates the Bahmani sultans, although they may have repaired it and increased its fortifications. They used the fort as a base for military expeditions against South Konkan and Goa. Firishta mentions the fort in an account of the rebellion of Bahadur Gilani in 1494, which was quelled by Sultan Muhammad II (1452–1515). Muhammad II took the fort from its governor, Buna Naik, who acquiesced to the new ruler. Gilani's troops were offered the option of joining Muhammad's army and being treated with leniency or leaving. About 2000 soldiers left the fort to join Gilani's rebel forces. The main entrance of the fortress was a huge gate about high but it has been demolished in recent times. Fall of the Bahmani Empire The power of the Bahmani rulers waned under the influence of powerful provincial governors. In 1490, the rule of Miraj passed to the Sultanate of Bijapur. During the later years of his reign, Ibrahim Ali Shah I (1534–1558) kept his son, Ali Adil Shah I (1558–1580), under house arrest in Miraj. On Ibrahim's death in 1580, Miraj became a point d' appui (an assembly point) for Ali's troops in his assuming the throne. Subsequently, the troops of Miraj fought with Ismail against Ibrahim Adil Shah III. Rise of the Maratha Empire On 28 November 1659, (within 18 days of Afzal Khan's, the Bijapuri sardar's, death at Pratapgad, Panhala), the western Adil Sahi district was surrendered to Annaji Datto (Shivaji's finance minister). Unlike other towns, the Miraj fort resisted. Shivaji, who was encamped at Kolhapur, sent Netaji Palkar to besiege Miraj. In January 1660, Shivaji arrived to personally command the three-month-long ongoing siege. However, news of attacks by Siddi Johar and Fazal Khan caused his return to Panhala. The siege of Miraj was abandoned and negotiations began. Under the rule of Sambhaji, Maratha generals (Santaji Ghorpade and Dhanaji Jadhav) chose Miraj as a safe place for their families while they were conducting guerilla actions against the invading