The first battle of Panipat (21 April 1526) was a major victory for Babur over Sultan Ibrahim Lodi of Delhi, won during his fifth and final expedition into Hindustan, and that helped establish the Mogul Empire.
Babur's fifth expedition began late in 1525, at a time when his control of the Punjab was under threat. His former ally, Alam Khan, the uncle of Ibrahim, had returned to Lahore from Kabul earlier in the year, and had promptly allied himself with Babur's enemy Daulat Khan, the former governor of Lahore for Ibrahim, and also briefly an ally of Babur. At about the same time that Babur left Kabul the new allies attacked Delhi, where they suffered a crushing defeat. Daulat Khan was forced to submit to Babur after promising to resist him, while Alam Khan returned to Babur's side during the march on Delhi.
With the Punjap secure Babur advanced to Sirhind, then to Ambala, sending his son Humayun to defeat a detachment from Ibrahim's army at Hisar-Firuza on 26 February 1526. From Ambala Babur moved east to reach the Jumna at Ambala. He then turned south, defeating another part of Ibrahim's army at a battle in the Doab on 2 April 1526. Ibrahim had not been idle. His victory at Delhi in 1525 had been won with quite a small force, but he had now raised a much larger army.
According to Babur he was told that Ibrahim's army contained 100,000 men and 1,000 elephants. Other sources give lower figures, (as low as 40,000 in some) which may reflect the number of effective fighting men or a desire to reduce the prestige of Babur's victory. Having raised this army Ibrahim advanced from Agra, to Delhi and then slowly moved north from the city, towards Panipat.
Babur's own army had been 12,000 strong when it crossed the Indus. Since them some men would have been lost, while Babur had also joined up with his garrison in the Punjab and with some local supporters, so his army may actually have grown by the time he reached Panipat, but he was still very badly outnumbered.
Babur came up with a plan that successfully negated Ibrahim's numerical advantage. In the last stage of the march Babur ordered his men to gather up as many carts as they could find. These seven hundred carts were lashed together in the 'Ottoman fashion', although using ropes to connect the carts rather than the chains used by the Ottomans. Enough space was left between each pair of carts to place five or six mantlets, and Babur's matchlock men were posted behind the mantlets. A number of gaps were left in the line, separated by an arrow's flight, and each wide enough to let 100-200 horsemen use them. One flank of Babur's line was protected by the town of Panipat, the other flank by a barrier of brush and ditches. He split his army into the normal left, right, centre and vanguard, but also created a reserve, and more importantly posted outflanking parties at the extreme right and left of the line. His plan was to wait for Ibrahim to attack the fortified line, and then have the flanking parties attack the rear of the enemy army.
The biggest problem Babur faced was getting Ibrahim to actually attack. The two armies faced each other for a week before the battle. Every day Babur's men rode out towards the enemy camp, firing arrows into their massed ranks and attempting to provoke a confrontation, but without success. Eventually Babur decided to launch a night attack on Ibrahim's camp, hoping that this would provoke a battle. A force of 4,000-5,000 men was selected to make this attack, but the night march went badly wrong, and at dawn Babur's men were in a dangerously exposed position close to Ibrahim's lines. Babur reacted by sending his son Humayun and an advanced guard towards the isolated men, and then followed up with the entire army, but although Ibrahim formed up as if he was about to pursuit Babur's men, no pursuit followed.
That night Babur's camp was disrupted by a false alarm, and on the morning of 21 April Ibrahim finally left his camp and moved to attack Babur's lines. Babur's plan worked perfectly. His flanking parties attacked the rear of Ibrahim's force, and the left and right wings attacked its sides. Ibrahim was unable to force his way through the barriers in Babur's centre, and his army became increasingly compressed. His left and right wings were soon unable to either attack or retreat, leaving only his centre still really active.
Although Babur's victory at Panipat is normally credited to his use of artillery, his own account of the battle suggests that it was his archers who played the biggest part in the battle, firing into the compacted Lodi army from left, right and rear. Only two small cannon are clearly mentioned, although the same text could refer to two small gun batteries.
The hardest part of the battle lasted from early in the morning until about noon. Ibrahim himself was killed during the fighting, although his body was not discovered until later in the afternoon. Babur dispatched a force towards Agra to try and catch the fleeing Sultan, before sending Humayun with a larger force to occupy the city and seize Ibrahim's treasury. According to Babur's memoirs his men estimated that they had killed 15-16,000 of the enemy, although the inhabitants of Agra estimated the losses at 40-50,000. Many of the survivors were captured, and
Three days after the battle Babur entered Delhi, where he found Ibrahim's mother and family and a number of his prisoners, treating both groups well. The battle of Panipat had established Babur as a major power in Hindustan, but he was not yet the acknowledged ruler of all of the areas claimed by Ibrahim - indeed for some time his authority was limited to the Punjab, Agra and Delhi.