At the age of 14, Babur ascended the throne of the Central Asian kingdom of Farghana. His greatest ambition was to rule Samarkand. He fought many battles in the pursuit of this goal, winning and losing his kingdom many times in the process. In 1504, he ventured into what is now Afghanistan and conquered Kabul.
His position in Central Asia was precarious at best. In order to consolidate his rule, he invaded India five times, crossing the River Indus each time. The fifth expedition resulted in his encounter with Ibrahim Lodhi in the first battle of Panipat in April 1526. Babur's army was better equipped than Lodhi's; he had guns while the sultan relied on elephants. The most successful of Babur's innovations was the introduction of gunpowder, which had never been used before in the Sub-continent. This combined with Babur's newer tactics gave him a greater advantage. Babur's strategy won the war and Ibrahim Lodhi died fighting.
Panipat was merely the beginning of the Mughal rule. Akbar laid its real foundation in 1556. At the time of the battle of Panipat, the political power in India was shared by the Afghans and the Rajputs. After Panipat, the Hindu princes united under Rana Sanga, the Raja of Mewar, resulting in a sizable force. Babur's army showed signs of panic at the size of the huge opposing army. To prevent his forces retreat, Babur tried to instill confidence in his soldiers by breaking all his drinking cups and vessels, and vowed never to drink again if he won. His soldiers took heart, and when the armies met in the battle at Kanwaha, near Agra on March 16, 1527, Babur was able to win decisively. Kanwaha confirmed and completed Babur's victory at Panipat. Babur thus became the king of Central India.