 Ibrahim Lodi also displeased the nobility when he replaced old and senior commanders by younger ones who were loyal to him.His Afghan nobility eventually invited Babur to invade India.In 1526, the Mughal forces of Babur, the king of Kabulistan (Kabul, Afghanistan), defeated Ibrahim's much larger army in the Battle of Panipat.