First Afghan-Mughal War (1526–1529)

The First Afghan-Mughal war was fought between the invading forces of Babur and the Lodi Empire. It resulted in defeat of Afghans and establishment of the Mughal empire.

Background
In 1526 babur captured Kabul. For several years he tried to re-conquer his hereditary domain but failed, The deficit economy of mountainous plateau of Afghanistan forced babur’s attention towards India. Babur required glory and money to keep the afghan soldiers under his control. Otherwise they would desert Mughal standards and join the rebellious chieftains, who from their hilly stronghold, were threatening babur’s shaky rule.

Battle of Panipat (1526)
Babur decided to test the quality of ibrahim’s military responses by conducting frontier raids. In 1519 babur took the bajaur fort, plundered bhira and then returned to Kabul. In 1520 he led a plundering expedition upon Sialkot. He continued such raids till 1524.The inaction of ibrahim lodhi’s government encouraged babur to stake every thing towards decisive throw of dice. Babur crossed the Rubicon when he launched his main invasion in the winter of 1525. His force crossed the Indus over attock.

Initially the delhi court thought babur was leading yet another plundering expedition. But when they won Punjab, ibrahim realized the gravity of situation and set his military machine in motion. Ibrahim himself accompanied the army, which was under his general Bahadur khan.brahim had more than one hundred thousand men and one thousand elephants. However it is improbable that he brought this whole army to fight the mughal invaders.While the rajput ruler, rana sanga threatened the southern boundary of ibrahim’s domain, recalcitrant afghan chiefs created problems in the eastern parts. To guard against these two threats, ibrahim had to detached substantial number of troops and elephants.

Hearing of the size of Ibrahim's army, Babur secured his right flank against the city of Panipat, while digging a trench covered with tree branches to secure his left flank. In the center, he placed 700 carts tied together with ropes. Between every two carts there were breastworks for his matchlockmen. Babur also ensured there was enough space for his cavalry to charge between these carts.

When Ibrahim's army arrived, he found the approach to Babur's army too narrow to attack. While Ibrahim redeployed his forces to allow for the narrower front, Babur quickly took advantage of the situation to flank (tulghuma) the Lodi army.[3] Many of Ibrahim's troops, were unable to get into action and as the battle turned against Ibrahim, they fled. Faced with musket fire, cannon fire and cavalry attacks from all sides, Ibrahim Lodi fought and died with 6,000 of his remaining troops.Ibrahim Lodi died on the field of battle along with 15,000 of his troops. The battle of Panipat was militarily a decisive victory. Politically it gained Babur little, and initiated a new phase of his establishment of the Mughal empire.

Battle of Khanwa (1527)
Khanwa is about 60 km west of Agra. Here the epic battle between the Muslim Mughals and the Confederation of Hindus and Afghans would play out. Mahmud Lodhi, brother of ibrahim lodhi, who had survived the first battle of Panipat came to the Rana along with his 10,000 horsemen and the Rana accepted him as an ally against Babur. Sultan Mahmud Lodi was acknowledged by the Afghans of the Delhi kingdom and by the Rana as the successor of his brother Ibrahim Lodi though he possessed no territory yet. Hasan khan mewati, a Muslim rajput ruler, contributed 12,000 soldiers to the grand alliance. In rana sanga’s camp, nearly all the rajput chiefs, with their armed contingents, had reported at his camp.

The rajput confederacy, against babur, was formed on the initiative of hasan khan mewati. Mahmud lodhi was set up as the king and is reported to have issued a gold coin from rana sanga’s camp, Which carried his name as the reigning sultan. babur denounced the afghans who opposed him as kafirs and mulhids.

It doesn’t seem that ran sanga had learnt any thing from the tactics of babur at panipat. H was proud of his elephants and swordsmen, and in the usual fashion, delivered a furious attack on babur’s right. He would have broken through but for timely reinforcements dispatched by babur. Once the advance of rajputs and their afghan allies had been contained., babur’s wheeling parties came into play. The carts and matchlock-men were also ordered to advance. Rana and his allies were hemmed in. despite gallant resistance, rana suffred a disastrous defeat. Hasan Khan Mewati was among the slain. Sultan Mahmud Lodi escaped. He took refuge in Gujarat.

Battle of Ghaghra (1529)
The Battle of Ghagra in 1529 was the last war of Babur in India. The battle was fought with the Afghans, on the confluence of the Ganga and its tributary, the Ghagara, on 6 May 1529. Sultan Mahmud Lodi, who had escaped from Khanua after Rana Sanga’s defeat, established himself in Bihar and gathered a large army which was estimated at 100,000 strong. At the head of this force he advanced on Banaras and proceeded beyond it as far as Chunar. He laid siege to the fortress of Chunar; but as Babur proceeded against him, the Afghans were filled with consternation, raised the siege and withdrew. Babur pursued and drove them into Bengal.

Anxious to put an end to the Afghan threat once for all, Babur decided to bring them to battle. But he was at peace with Nusrat Shah of Bengal with whom the Afghan chiefs, headed by Mahmud Lodi, had taken shelter. So he opened negotiations with Nusrat Shah, but nothing came out of it. He was obliged, therefore, to send an ultimatum asking for a passage and in the event of refusal, holding him responsible for the consequences. Babur fought a battle with the Afghans, on the confluence of the Ganga and its tributary, the Ghagara, on 6 May 1529. In the conflict, which was tough, boats and artillery were used by both sides. The Afghans were defeated. A treaty was now concluded between Babur and Nusrat Shah agreed not to give shelter to Babur’s enemies. This was Babur’s last battle in India. As the result of this contest he became the sovereign of Bihar, and the Afghan chiefs joined him with their troops. He was now in possession of this country from the Indus to Bihar and from the Himalayas to Gwalior and Chanderi.