The Delhi Sultanate, or the Sultanate of Delhi, was an Islamic empire based in Delhi that stretched over large parts of the Indian subcontinent during the period of Medieval India, for 320 years (1206–1526).There were five unrelated heterogeneous dynasties ruled over the Delhi Sultanate sequentially: the Mamluk dynasty (1206–1290), the Khalji dynasty (1290–1320), the Tughlaq dynasty (1320–1414), the Sayyid dynasty (1414–1451), and the Lodi dynasty (1451–1526). It covered large swaths of territory in modern-day India, Pakistan, and Bangladesh as well as some parts of southern Nepal.
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 and Rana Sanga, 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.