First Battle of Panipat
The first Battle of Panipat, on 20 April 1526, was fought between the invading forces of Babur and the Lodi dynasty. It took place in North India and marked the beginning of the Mughal Empire and the end of the Delhi Sultanate. This was one of the earliest battles involving gunpowder firearms and field artillery in the Indian subcontinent which were introduced by Mughals in this battle. Babur defeated the Sultan of Delhi, Ibrahim Lodi, using a combination of tactics such as the use of firearms and cavalry charges. This battle marked the beginning of Mughal rule in India, and its aftermath had a significant impact on the political and social landscape of the country, establishing the Mughal Empire, which lasted for  231 years (1526-1757). Background 

After losing Samarkand for the second time, Babur gave attention to conquer Hindustan as he reached the banks of the Chenab in 1519. Until 1524, his aim was to only expand his rule to Punjab, mainly to fulfil his ancestor Timur's legacy, since it used to be part of his empire. At that time, most of North India was under the rule of Ibrahim Lodi of the Lodi dynasty, but the empire was crumbling and there were many defectors. He received invitations from Daulat Khan Lodi, Governor of Punjab and Ala-ud-Din, uncle of Ibrahim. He sent an ambassador to Ibrahim, claiming himself the rightful heir to the throne of the country, however the ambassador was detained at Lahore and released months later. Babur started for Lahore, Punjab, in 1524 but found that Daulat Khan Lodi had been driven out by forces sent by Ibrahim Lodi. When Babur arrived at Lahore, the Lodi army marched out and was routed. In response, Babur burned Lahore for two days, then marched to Dipalpur, placing Alam Khan, another rebel uncle of Lodi's, as governor. Alam Khan was quickly overthrown and fled to Kabul. In response, Babur supplied Alam Khan with troops who later joined up with Daulat Khan Lodi and together with about 30,000 troops, they besieged Ibrahim Lodi at Delhi. He defeated them and drove Alam's army off; and Babur realised Lodi would not allow him to occupy the Punjab. Battle
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 centre, he placed 700 carts tied together with ropes. Between every two carts, there were breastworks for his matchlock men. Babur also ensured that there was enough space for his soldiers to rest their guns and fire. Babur referred to this method as the "Ottoman device" due to its previous use by the Ottomans during the Battle of Chaldiran. 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 them. Ibrahim Lodi was killed while trying to retreat and beheaded. 20,000 Lodi soldiers were killed in battle. Advantage of cannons in the battle
Babur's guns proved decisive in battle, firstly because Ibrahim lacked any field artillery, but also because the sound of the cannon frightened Ibrahim's elephants, causing them to trample his men. Tactics

Tactics used by Babur were the tulguhma and the araba. Tulguhma meant dividing the whole army into various units, viz. the Left, the Right, and the Centre. The Left and Right divisions were further subdivided into Forward and Rear divisions. Through this, a small army could be used to surround the enemy from all sides. The Centre Forward division was then provided with carts (araba) which were placed in rows facing the enemy and tied to each other with animal hide ropes. Behind them were placed cannons protected and supported by mantlets that could be used to easily manoeuvre the cannons. These two tactics made Babur's artillery lethal. The cannons could be fired without any fear of being hit, as they were shielded by the bullock carts held in place by hiding ropes. The heavy cannons could also be easily traversed onto new targets, as they could be manoeuvred by the mantlets which were on wheels. After Ibrahim Lodi died
Ibrahim Lodi died on the field of battle along with 20,000 of his troops. The battle of Panipat was militarily a decisive victory for the Timurids. Politically it gained Babur new lands, and initiated a new phase of his establishment of the long-lasting Mughal Empire in the heart of the Indian subcontinent, an empire that stood for over 300 years. 