The Lodi dynasty had its origins in the Afghan Lodi tribe. Bahlol Lodi (or Bahlul Lodi) was the first Afghan, Pathan, to rule Delhi Sultanate and the one who started the dynasty. Bahlol Lodi began his reign by attacking the Muslim controlled Kingdom of Jaunpur to expand the influence of Delhi Sultanate, and was partially successful through a treaty. Thereafter, the region from Delhi to Benares (then at the border of Bengal province), was back under influence of Delhi Sultanate.
After Bahlol Lodi died, his son Nizam Khan assumed power, rechristened himself as Sikandar Shah Ghazi Lodi and ruled from 1489-1517. One of the better known rulers of this dynasty, Sikandar Lodi expelled his brother Barbak Shah from Jaunpur, installed his son Jalal Khan as the ruler, then proceeded east to make claims on Bihar. The Muslim amir (noble) governors of Bihar agreed to pay tribute and taxes, but operated independent of Delhi Sultanate. Sikandar Lodi led a campaign of destruction of temples, particularly around Mathura. He also moved his capital and court from Delhi to Agra, an ancient Hindu city that had been destroyed during the plunder and attacks of the early Delhi Sultanate period. Sikandar thus erected buildings with Indo-Islamic architecture in Agra during his rule, and the growth of Agra continued during the Mughal Empire, after the end of Delhi Sultanate.
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 amirs 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. After Jalal Khan’s death, the governor of Punjab – Dawlat Khan Lodī – reached out to the Mughal Babur and invited him to attack 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.