Lodi dynasty
The Lodi dynasty () was a dynasty that ruled the Delhi Sultanate from 1451 to 1526. It was the fifth and final dynasty of the Delhi Sultanate, and was founded by Bahlul Khan Lodi when he replaced the Sayyid dynasty. Bahlul Lodi

Following the reign of the Sayyids, the Afghan or Turco-Afghan Lodi dynasty gained the sultanate. Bahlul Khan Lodi () was the nephew and son-in-law of Malik Sultan Shah Lodi, the governor of Sirhind in (Punjab), India and succeeded him as the governor of Sirhind during the reign of Sayyid dynasty ruler Muhammad Shah. Muhammad Shah raised him to the status of a Tarun-Bin-Sultan. He was the most powerful of the Punjab chiefs and a vigorous leader, holding together a loose confederacy of Afghan and Turkish chiefs with his strong personality. He reduced the turbulent chiefs of the provinces to submission and infused some vigour into the government. After the last Sayyid ruler of Delhi, Alauddin Alam Shah voluntarily abdicated in favour of him, Bahlul Khan Lodi ascended the throne of the Delhi sultanate on 19 April 1451. The most important event of his reign was the conquest of the Jaunpur Sultanate. Bahlul spent most of his time in fighting against the Sharqi dynasty of the Jaunpur Sultanate and ultimately annexed it. He placed his eldest surviving son Barbak on the throne of Jaunpur in 1486. The Sharqis remained in control of Bihar, from which they re-occupied Jaunpur, but were again repulsed to Bihar. Sikandar Khan Lodi

Sikandar Khan Lodi () (born Nizam Khan), the second son of Bahlul, succeeded him after his death on 17 July 1489 and took up the title Sikandar Shah. His father nominated him as his successor and he was crowned sultan on 15 July 1489. He founded Agra in 1504 and built mosques. He shifted the capital from Delhi to Agra. He patronized trade and commerce. He was a reputed poet, composing under Guru's pen name. He was also a patron of learning and ordered translations of Sanskrit works in medicine into Persian. He curbed the individualistic tendencies of his Pashtun nobles and compelled them to submit their accounts to a state audit. He was thus able to infuse vigour and discipline in the administration. His greatest achievement was the conquest and annexation of Bihar from the Sharqis. During conflict and peace, Sikandar felt the urge to destroy temples. He also forbade the yearly procession of the famed Muslim martyr Masud Salar's spear,  while forbidding Muslim women from venerating mausoleums of Muslim saints. Sikander allowed the execution of a Brahman, who had held the equal accuracy of his faith compared to Islam. Ibrahim Lodi

Ibrahim Khan Lodi (), the eldest son of Sikandar, was the last Lodi Sultan of Delhi. He had the qualities of an excellent warrior, but he was rash and impolitic in his decisions and actions. His attempt at royal absolutism was premature and his policy of sheer repression unaccompanied by measures to strengthen the administration and increase the military resources was sure to prove a failure. Ibrahim faced numerous rebellions and kept out the opposition for almost a decade. He was engaged in warfare with the Afghans and the Timurid Empire for most of his reign and died trying to keep the Lodi dynasty from annihilation. Ibrahim was defeated in 1526 at the Battle of Panipat. This marked the end of the Lodi dynasty and the rise of the Mughal Empire in India led by Babur (). Fall of the empire

By the time Ibrahim ascended the throne, the political structure in the Lodi dynasty had dissolved due to abandoned trade routes and the depleted treasury. The Deccan was a coastal trade route, but in the late fifteenth century the supply lines had collapsed. The decline and eventual failure of this specific trade route resulted in cutting off supplies from the coast to the interior, where the Lodi empire resided. The Lodi dynasty was not able to protect itself if warfare were to break out on the trade route roads; therefore, they didn't use those trade routes, thus their trade declined and so did their treasury leaving them vulnerable to internal political problems. In order to take revenge of the insults done by Ibrahim, the governor of Lahore, Daulat Khan Lodi asked the Timurid ruler of Kabul, Babur to invade his kingdom. Ibrahim Lodi was thereafter killed in a battle with Babur, at the Battle of Panipat (1526). With the death of Ibrahim Lodi, the Lodi dynasty also came to an end, leading to the establishment of the Mughal Empire in the subcontinent. Afghan factionalism

Another problem Ibrahim faced when he ascended the throne in 1517 were the Pashtun nobles, some of whom supported Ibrahim's older brother, Jalaluddin, in taking up arms against his brother in the area in the east at Jaunpur. Ibrahim gathered military support and defeated his brother by the end of the year. After this incident, he arrested those Pashtun nobles who opposed him and appointed his own men as the new administrators. Other Pashtun nobles supported the governor of Bihar, Dariya Khan, against Ibrahim. Another factor that caused uprisings against Ibrahim was his lack of an apparent successor. His own uncle, Alam Khan, betrayed Ibrahim by supporting the Mughal invader Babur. Rajput invasions and internal rebellions
Rana Sanga, the Rajput leader of Mewar (), extended his kingdom, defeated the Lodi king of Delhi and was acknowledged by all the Rajput clans as the leading prince of Rajputana. Daulat Khan, the governor of Punjab region asked Babur to invade the Lodi kingdom, with the thought of taking revenge from Ibrahim Lodi. Rana Sanga also offered his support to Babur to defeat Ibrahim Lodi. Battle of Panipat, 1526

After being assured of the cooperation of Alam Khan and Daulat Khan, Governor of the Punjab, Babur gathered his army. Upon entering the Punjab plains, Babur's chief allies, namely Langar Khan Niazi advised Babur to engage the powerful Janjua Rajputs to join his conquest. The tribe's rebellious stance to the throne of Delhi was well known. Upon meeting their chiefs, Malik Hast (Asad) and Raja Sanghar Khan, Babur made mention of the Janjua's popularity as traditional rulers of their kingdom and their ancestral support for his patriarch Emir Timur during his conquest of Hind. Babur aided them in defeating their enemies, the Gakhars in 1521, thus cementing their alliance. Babur employed them as Generals in his campaign for Delhi, the conquest of Rana Sanga and the conquest of India. The new usage of guns allowed small armies to make large gains on enemy territory. Small parties of skirmishers who had been dispatched simply to test enemy positions and tactics, were making inroads into India. Babur, however, had survived two revolts, one in Kandahar and another in Kabul, and was careful to pacify the local population after victories, following local traditions and aiding widows and orphans. Despite both being Sunni Muslims, Babur wanted Ibrahim's power and territory. Babur and his army of 24,000 men marched to the battlefield at Panipat armed with muskets and artillery. Ibrahim prepared for battle by gathering 100,000 man (well-armed but with no guns) and 1,000 elephants. Ibrahim was at a disadvantage because of his outmoded infantry and internecine rivalries. Even though he had more men, he had never fought in a war against gunpowder weapons and he did not know what to do strategically. Babur pressed his advantage from the start and Ibrahim perished on the battlefield in April 1526, along with 20,000 of his men. Accession of Babur and the Mughals

After Ibrahim's death, Babur named himself emperor over Ibrahim's territory, instead of placing Alam Khan (Ibrahim's uncle) on the throne. Ibrahim's death marked the end of the Lodi dynasty and led to the establishment of the Mughal Empire in India. The remaining Lodi territories were absorbed into the new Mughal Empire. Babur continued to engage in military campaigns. Mahmud Lodi
Ibrahim Lodi's brother, Mahmud Lodi, declared himself Sultan and continued to resist Mughal forces. He provided around 4,000 Afghan soldiers to Rana Sanga in the Battle of Khanwa in 1527. After that defeat, Mahmud Lodi fled eastwards and again posed a challenge to Babur two years later at the Battle of Ghaghra in 1529. Religion and architecture

Like their predecessors, the Lodhi sultans stylized themselves as the deputies of the Abbasid Caliphs, and thus acknowledged the authority of a united Caliphate over the Muslim world. They provided cash stipends and granted revenue-free lands (including entire villages) to the Muslim ulama, the Sufi shaikhs, the claimed descendants of Muhammad, and to the members of his Quraysh tribe. The Muslim subjects of the Lodis were required to pay the zakat tax for religious merit, and the non-Muslims were required to pay the jizya tax for receiving state protection. In some parts of the Sultanate, the Hindus were required to pay an additional pilgrimage tax. Nevertheless, several Hindu officers formed a part of the Sultanate's revenue administration. Sikandar Lodi, whose mother was a Hindu, resorted to strong Sunni orthodoxy to prove his Islamic credentials as a political expediency. He destroyed Hindu temples, and under the pressure from the ulama, allowed the execution of a Brahman who declared Hinduism to be as veracious as Islam. He also banned women from visiting the mazars (mausoleums) of Muslim saints, and banned the annual procession of the spear of the legendary Muslim martyr Salar Masud. He also established sharia courts in several towns with significant Muslim population, enabling the qazis to administer the Islamic law to Muslim as well as non-Muslim subjects. 