In 1526, Babur, a descendant of Timur and Genghis Khan from the Fergana Valley was ousted from his ancestral domain in Central Asia. Bābur turned to India and crossed the Khyber Pass. He was able to secure control of Punjab, and in 1526 he decisively defeated the forces of the Delhi sultan Ibrāhīm Lodī at the First Battle of Panipat. The next year, he defeated the Rajput confederacy under Rana Sanga of Mewar, and in 1529 defeated the remnants of the Delhi sultanates. At his death in 1530 the Mughal Empire encompassed almost all of Northern India.
