Babur, the first Mughal emperor, took advantage of the unstable political situation in India after Sikandar Lodi's death. He attacked India on the invitation of Daulat Khan. Babur defeated Ibrahim Lodi in the battle of Panipat in 1526. He also overcame Rajput opponents in the battle of Khanwa in 1527. Babur's two major victories decisively shifted the balance of power and established Mughals as the foremost rulers of India.