Sikandar Lodi died a natural death in 1517, and his second son Ibrahim Lodi assumed power. Ibrahim did not enjoy the support of Afghan and Persian nobles or regional chiefs. Ibrahim attacked and killed his elder brother Jalal Khan, who was installed as the governor of Jaunpur by his father and had the support of the amirs and chiefs. Ibrahim Lodi was unable to consolidate his power, and after Jalal Khan's death, the governor of Punjab, Daulat Khan Lodi, reached out to the Mughal Babur and invited him to attack the Delhi Sultanate. Babur defeated and killed Ibrahim Lodi in the Battle of Panipat in 1526. The death of Ibrahim Lodi ended the Delhi Sultanate, and the Mughal Empire replaced it.