Ibrahim Lodhi was a very strict ruler. All the chieftains and the rich turned against him and they invited Babar to attack Hindustan for occupation. Babar attacked Hindustan and occupied Hindustan.
The Mughal Emperors, from the early 16th century to the mid 19th century, built and ruled the Mughal Empire on the Indian subcontinent, mainly corresponding to the modern countries of India, Pakistan, Afghanistan and Bangladesh. The Mughals were a branch of the Timurid dynasty of Turco-Mongol origin from Central Asia. Their power rapidly dwindled during the 18th century and the last of the emperors was deposed in 1857, with the establishment of the British Raj. Mughal emperors were of direct descent from Timur (generally known in western nations as Tamerlane), and also affiliated with Genghis Khan, because of Tamerlane’s marriage with a Genghisid princess.
The Mughals also had significant Indian Rajput and Persian ancestry through marriage alliances, as emperors were born to Rajput and Persian princesses. Only the first two Mughal emperors, Babur and Humayun, were fully Central Asian (Turkic people), whereas Akbar was half-Persian (his mother was of Persian origin), Jahangir was half-Rajput and quarter-Persian, and Shah Jahan was three-quarters Rajput.
At their Empire's greatest extent in the late 17th and early 18th centuries, Mughals controlled much of the Indian subcontinent, extending from Bengal in the east to Kabul and Sindh in the west, Kashmir in the north to the Kaveri basin in the south. Its population at the time has been estimated as between 110 and 150 million (a quarter of the world's population), over a territory of more than 4 million square kilometres (1.2 million square miles
The Mughal Empire (also referred to as Baburid Empire, Baburid Dynasty) was founded by Zahiriddin Muhammad Babur, a Timurid prince and ruler from Central Asia. Babur was a direct descendant to the Timurid Emperor Tamerlane on his father's side and also had links to Chagatai, the second son of the Mongol ruler Genghis Khan, on his mother’s side. Ousted from his ancestral domains in Turkistan by Sheybani Khan, the 14-year old Prince Babur turned to India to satisfy his ambitions. He established himself in Kabul and then pushed steadily southward into India from Afghanistan through the Khyber Pass. Babur's forces occupied much of northern India after his victory at Panipat in 1526. The preoccupation with wars and military campaigns, however, did not allow the new emperor to consolidate the gains he had made in India. The instability of the empire became evident under his son, Humayun, who was driven out of India and into Persia by rebels. Humayun's exile in Persia established diplomatic ties between the Safavid and Mughal Courts, and led to increasing West Asian cultural influence in the Mughal court. The restoration of Mughal rule began after Humayun’s triumphant return from Persia in 1555, but he died from a fatal accident shortly afterwards. Humayun's son, Akbar, succeeded to the throne under a regent, Bairam Khan, who helped consolidate the Mughal Empire in India