he First Battle of Panipat, on 21 April 1526, was fought between the invading forces of Babur and the Ibrahim Lodi. It took place in north India and marked the beginning of the Mughal Empire. This was one of the earliest battles involving gunpowder firearms and field artillery in India.
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. Many of Ibrahim's troops were unable to get into action, and fled when the battle turned against Ibrahim. Faced with musket fire, cannon fire and cavalry attacks from all sides, Ibrahim Lodi fought and died with 6,000 of his remaining troops.
Babur's guns proved decisive in battle, firstly because Ibrahim Lodi lacked any field artillery, but also because the sound of the cannon frightened Lodi's elephants, causing them to trample Lodi's own men.