Ibrahim Lodi was the ruler of the northern part of India .
At the time , parts of the north were under the rule of Ibrahim Lodi of the Lodi dynasty , but the empire was crumbling and there were many defectors .